Skip to content

Commit fdbad2e

Browse files
author
Olexandr Lysenko
committed
MAGETWO-60397 [GITHUB] Fix incorrect table name during catalog product indexing #7256
1 parent ff20a0d commit fdbad2e

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/FlatTableBuilderTest.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,7 @@ public function testBuild()
122122
$eavCustomValueField = $eavCustomField . $valueFieldSuffix;
123123
$this->flatIndexerMock->expects($this->once())->method('getAttributes')->willReturn([]);
124124
$this->flatIndexerMock->expects($this->exactly(3))->method('getFlatColumns')
125-
->willReturnOnConsecutiveCalls(
126-
[],
127-
[$eavCustomValueField => []],
128-
[$eavCustomValueField => []]
129-
);
125+
->willReturnOnConsecutiveCalls([], [$eavCustomValueField => []], [$eavCustomValueField => []]);
130126
$this->flatIndexerMock->expects($this->once())->method('getFlatIndexes')->willReturn([]);
131127
$statusAttributeMock = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute::class)
132128
->disableOriginalConstructor()
@@ -137,24 +133,16 @@ public function testBuild()
137133
$this->flatIndexerMock->expects($this->once())->method('getTablesStructure')
138134
->willReturn(
139135
[
140-
'catalog_product_entity' => [
141-
$linkField => $statusAttributeMock
142-
],
136+
'catalog_product_entity' => [$linkField => $statusAttributeMock],
143137
'catalog_product_entity_int' => [
144138
$linkField => $statusAttributeMock,
145139
$eavCustomField => $eavCustomAttributeMock
146140
]
147141
]
148142
);
149143
$this->flatIndexerMock->expects($this->atLeastOnce())->method('getTable')
150-
->withConsecutive(
151-
[$tableName],
152-
['catalog_product_website']
153-
)
154-
->willReturnOnConsecutiveCalls(
155-
$tableName,
156-
'catalog_product_website'
157-
);
144+
->withConsecutive([$tableName], ['catalog_product_website'])
145+
->willReturnOnConsecutiveCalls($tableName, 'catalog_product_website');
158146
$this->flatIndexerMock->expects($this->once())->method('getAttribute')
159147
->with('status')
160148
->willReturn($statusAttributeMock);

0 commit comments

Comments
 (0)