Skip to content

Commit e06f08e

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

File tree

1 file changed

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

1 file changed

+18
-1
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Store\Model\Store;
1313
use Magento\Catalog\Model\Config;
1414
use Magento\Catalog\Model\Indexer\Product\Category\Action\Rows;
15+
use Magento\Catalog\Model\Indexer\Product\Category as ProductCategoryIndexer;
1516
use Magento\Catalog\Model\Indexer\Category\Product as CategoryProductIndexer;
1617
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
1718
use Magento\Indexer\Model\WorkingStateProvider;
@@ -228,10 +229,26 @@ public function testExecuteWithIndexerWorking() : void
228229
$this->connection->expects($this->any())
229230
->method('fetchOne')
230231
->willReturn($categoryId);
231-
$this->indexerRegistry->expects($this->any())
232+
$this->indexerRegistry->expects($this->at(0))
232233
->method('get')
233234
->with(CategoryProductIndexer::INDEXER_ID)
234235
->willReturn($this->indexer);
236+
$this->indexerRegistry->expects($this->at(1))
237+
->method('get')
238+
->with(CategoryProductIndexer::INDEXER_ID)
239+
->willReturn($this->indexer);
240+
$this->indexerRegistry->expects($this->at(2))
241+
->method('get')
242+
->with(ProductCategoryIndexer::INDEXER_ID)
243+
->willReturn($this->indexer);
244+
$this->indexerRegistry->expects($this->at(3))
245+
->method('get')
246+
->with(CategoryProductIndexer::INDEXER_ID)
247+
->willReturn($this->indexer);
248+
$this->indexerRegistry->expects($this->at(4))
249+
->method('get')
250+
->with(ProductCategoryIndexer::INDEXER_ID)
251+
->willReturn($this->indexer);
235252
$this->indexer->expects($this->any())
236253
->method('getId')
237254
->willReturn(CategoryProductIndexer::INDEXER_ID);

0 commit comments

Comments
 (0)