@@ -56,6 +56,9 @@ class AbstractTest extends TestCase
56
56
/** @var StoreRepositoryInterface */
57
57
private $ storeRepository ;
58
58
59
+ /** @var LayoutInterface */
60
+ private $ layout ;
61
+
59
62
/**
60
63
* @inheritdoc
61
64
*/
@@ -71,6 +74,7 @@ protected function setUp()
71
74
$ this ->categoryLinkManagement = $ this ->objectManager ->create (CategoryLinkManagementInterface::class);
72
75
$ this ->storeManager = $ this ->objectManager ->get (StoreManagerInterface::class);
73
76
$ this ->storeRepository = $ this ->objectManager ->create (StoreRepositoryInterface::class);
77
+ $ this ->layout = $ this ->objectManager ->get (LayoutInterface::class);
74
78
}
75
79
76
80
/**
@@ -121,7 +125,7 @@ public function productDataProvider(): array
121
125
* @param array $data
122
126
* @return void
123
127
*/
124
- public function testCategoryProductVisibilityTest (array $ data ): void
128
+ public function testCategoryProductVisibility (array $ data ): void
125
129
{
126
130
$ collection = $ this ->processCategoryViewTest ($ data ['data ' ]['sku ' ], $ data ['data ' ]);
127
131
@@ -256,7 +260,7 @@ private function processAnchorTest(bool $isAnchor): array
256
260
$ this ->objectManager ->removeSharedInstance (Resolver::class);
257
261
$ this ->objectManager ->removeSharedInstance (Layer::class);
258
262
$ this ->registerCategory ($ childCategory );
259
- $ newBlock = $ this ->objectManager -> get (LayoutInterface::class) ->createBlock (ListProduct::class);
263
+ $ newBlock = $ this ->layout ->createBlock (ListProduct::class);
260
264
$ childCategoryCollection = $ newBlock ->getLoadedProductCollection ();
261
265
262
266
return [
0 commit comments