@@ -78,13 +78,11 @@ public function testReindexAll()
78
78
* @magentoDbIsolation disabled
79
79
* @magentoAppIsolation enabled
80
80
* @magentoDataFixture Magento/Catalog/_files/product_simple_multistore.php
81
- * @magentoDataFixture Magento/Catalog/_files/enable_catalog_product_flat_indexer.php
81
+ * @magentoConfigFixture current_store catalog/frontend/flat_catalog_product 1
82
+ * @magentoConfigFixture fixturestore_store catalog/frontend/flat_catalog_product 1
82
83
*/
83
84
public function testReindexAllMultipleStores ()
84
85
{
85
- $ this ->_state = $ this ->objectManager ->create (State::class);
86
- $ this ->_processor = $ this ->objectManager ->create (Processor::class);
87
-
88
86
$ this ->assertTrue ($ this ->_state ->isFlatEnabled ());
89
87
$ this ->_processor ->reindexAll ();
90
88
@@ -93,9 +91,10 @@ public function testReindexAllMultipleStores()
93
91
/** @var StoreManagerInterface $storeManager */
94
92
$ storeManager = $ this ->objectManager ->get (StoreManagerInterface::class);
95
93
$ store = $ storeManager ->getStore ('fixturestore ' );
94
+ $ defaultStore = $ storeManager ->getDefaultStoreView ();
96
95
97
96
$ expectedData = [
98
- $ storeManager -> getDefaultStoreView () ->getId () => 'Simple Product One ' ,
97
+ $ defaultStore ->getId () => 'Simple Product One ' ,
99
98
$ store ->getId () => 'StoreTitle ' ,
100
99
];
101
100
@@ -116,5 +115,7 @@ public function testReindexAllMultipleStores()
116
115
'Wrong product name specified per store. '
117
116
);
118
117
}
118
+
119
+ $ storeManager ->setCurrentStore ($ defaultStore ->getId ());
119
120
}
120
121
}
0 commit comments