Skip to content

Commit f4b7937

Browse files
committed
MC-38038: Partial reindex of prices causes empty categories (missed products)
1 parent 90372d9 commit f4b7937

File tree

1 file changed

+9
-1
lines changed
  • app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action

1 file changed

+9
-1
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowsTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
use PHPUnit\Framework\TestCase;
2626
use PHPUnit\Framework\MockObject\MockObject;
2727

28+
/**
29+
* Test coverage for the rows action
30+
*
31+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects) to preserve compatibility with parent class
32+
*/
2833
class RowsTest extends TestCase
2934
{
3035
/**
@@ -172,13 +177,16 @@ public function testBatchProcessing()
172177
$this->dimensionCollectionFactory->expects($this->exactly(2))
173178
->method('create')
174179
->willReturn($multiDimensionProvider);
175-
$iterator = new \ArrayObject([]);
180+
$iterator = new \ArrayIterator([]);
176181
$multiDimensionProvider->expects($this->exactly(2))
177182
->method('getIterator')
178183
->willReturn($iterator);
179184
$this->catalogProductType->expects($this->any())
180185
->method('getTypesByPriority')
181186
->willReturn([]);
187+
$adapter->expects($this->any())
188+
->method('getPrimaryKeyName')
189+
->willReturn(['COLUMNS_LIST'=>['entity_id']]);
182190
$this->actionRows->execute($ids);
183191
}
184192
}

0 commit comments

Comments
 (0)