Skip to content

Commit e363354

Browse files
committed
MC-38168: Manual Indexer after Merchandising - Empty Catalog/ Number of products incorrect
1 parent 6f39948 commit e363354

File tree

1 file changed

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

1 file changed

+18
-1
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Magento\Catalog\Model\Config;
1414
use Magento\Catalog\Model\Indexer\Category\Product\Action\Rows;
1515
use Magento\Catalog\Model\Indexer\Product\Category as ProductCategoryIndexer;
16+
use Magento\Catalog\Model\Indexer\Category\Product as CategoryProductIndexer;
1617
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
1718
use Magento\Indexer\Model\WorkingStateProvider;
1819
use Magento\Framework\EntityManager\EntityMetadataInterface;
@@ -219,10 +220,26 @@ public function testExecuteWithIndexerWorking() : void
219220
$this->connection->expects($this->any())
220221
->method('fetchOne')
221222
->willReturn($categoryId);
222-
$this->indexerRegistry->expects($this->any())
223+
$this->indexerRegistry->expects($this->at(0))
223224
->method('get')
224225
->with(ProductCategoryIndexer::INDEXER_ID)
225226
->willReturn($this->indexer);
227+
$this->indexerRegistry->expects($this->at(1))
228+
->method('get')
229+
->with(ProductCategoryIndexer::INDEXER_ID)
230+
->willReturn($this->indexer);
231+
$this->indexerRegistry->expects($this->at(2))
232+
->method('get')
233+
->with(CategoryProductIndexer::INDEXER_ID)
234+
->willReturn($this->indexer);
235+
$this->indexerRegistry->expects($this->at(3))
236+
->method('get')
237+
->with(ProductCategoryIndexer::INDEXER_ID)
238+
->willReturn($this->indexer);
239+
$this->indexerRegistry->expects($this->at(4))
240+
->method('get')
241+
->with(CategoryProductIndexer::INDEXER_ID)
242+
->willReturn($this->indexer);
226243
$this->indexer->expects($this->any())
227244
->method('getId')
228245
->willReturn(ProductCategoryIndexer::INDEXER_ID);

0 commit comments

Comments
 (0)