13
13
use Magento \Store \Model \StoreManagerInterface ;
14
14
use Magento \Catalog \Model \Indexer \Product \Flat \Action \Full as FlatIndexerFull ;
15
15
use Magento \Catalog \Helper \Product \Flat \Indexer ;
16
- use Magento \Catalog \Model \Indexer \Product \Flat \TableBuilder ;
17
- use Magento \Catalog \Model \Indexer \Product \Flat \FlatTableBuilder ;
18
16
use Magento \Framework \Exception \LocalizedException ;
19
17
use Magento \TestFramework \Helper \Bootstrap ;
20
18
@@ -59,10 +57,6 @@ protected function setUp(): void
59
57
{
60
58
$ objectManager = Bootstrap::getObjectManager ();
61
59
62
- $ tableBuilderMock = $ objectManager ->get (TableBuilder::class);
63
- $ flatTableBuilderMock =
64
- $ objectManager ->get (FlatTableBuilder::class);
65
-
66
60
$ this ->productIndexerHelper = $ objectManager ->create (
67
61
Indexer::class,
68
62
['addChildData ' => true ]
@@ -71,8 +65,6 @@ protected function setUp(): void
71
65
FlatIndexerFull::class,
72
66
[
73
67
'productHelper ' => $ this ->productIndexerHelper ,
74
- 'tableBuilder ' => $ tableBuilderMock ,
75
- 'flatTableBuilder ' => $ flatTableBuilderMock
76
68
]
77
69
);
78
70
$ this ->storeManager = $ objectManager ->get (StoreManagerInterface::class);
@@ -120,9 +112,9 @@ private function addChildColumns(): void
120
112
{
121
113
foreach ($ this ->storeManager ->getStores () as $ store ) {
122
114
$ 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 ' )
126
118
) {
127
119
$ this ->connection ->addColumn (
128
120
$ flatTable ,
0 commit comments