1313use Magento \Store \Model \StoreManagerInterface ;
1414use Magento \Catalog \Model \Indexer \Product \Flat \Action \Full as FlatIndexerFull ;
1515use Magento \Catalog \Helper \Product \Flat \Indexer ;
16- use Magento \Catalog \Model \Indexer \Product \Flat \TableBuilder ;
17- use Magento \Catalog \Model \Indexer \Product \Flat \FlatTableBuilder ;
1816use Magento \Framework \Exception \LocalizedException ;
1917use Magento \TestFramework \Helper \Bootstrap ;
2018
@@ -59,10 +57,6 @@ protected function setUp(): void
5957 {
6058 $ objectManager = Bootstrap::getObjectManager ();
6159
62- $ tableBuilderMock = $ objectManager ->get (TableBuilder::class);
63- $ flatTableBuilderMock =
64- $ objectManager ->get (FlatTableBuilder::class);
65-
6660 $ this ->productIndexerHelper = $ objectManager ->create (
6761 Indexer::class,
6862 ['addChildData ' => true ]
@@ -71,8 +65,6 @@ protected function setUp(): void
7165 FlatIndexerFull::class,
7266 [
7367 'productHelper ' => $ this ->productIndexerHelper ,
74- 'tableBuilder ' => $ tableBuilderMock ,
75- 'flatTableBuilder ' => $ flatTableBuilderMock
7668 ]
7769 );
7870 $ this ->storeManager = $ objectManager ->get (StoreManagerInterface::class);
@@ -120,9 +112,9 @@ private function addChildColumns(): void
120112 {
121113 foreach ($ this ->storeManager ->getStores () as $ store ) {
122114 $ flatTable = $ this ->productIndexerHelper ->getFlatTableName ($ store ->getId ());
123- if ($ this ->connection ->isTableExists ($ flatTable ) &&
124- !$ this ->connection ->tableColumnExists ($ flatTable , 'child_id ' ) &&
125- !$ this ->connection ->tableColumnExists ($ flatTable , 'is_child ' )
115+ if ($ this ->connection ->isTableExists ($ flatTable )
116+ && !$ this ->connection ->tableColumnExists ($ flatTable , 'child_id ' )
117+ && !$ this ->connection ->tableColumnExists ($ flatTable , 'is_child ' )
126118 ) {
127119 $ this ->connection ->addColumn (
128120 $ flatTable ,
0 commit comments