Skip to content

Commit 8ea52e3

Browse files
committed
MC-38168: Manual Indexer after Merchandising - Empty Catalog/ Number of products incorrect
1 parent 10060fb commit 8ea52e3

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

app/code/Magento/Indexer/Test/Unit/Model/ProcessorTest.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Magento\Indexer\Model\Indexer\Collection;
1717
use Magento\Indexer\Model\Indexer\CollectionFactory;
1818
use Magento\Indexer\Model\Indexer\State;
19-
use Magento\Indexer\Model\WorkingStateProvider;
2019
use Magento\Indexer\Model\Processor;
2120
use Magento\Indexer\Model\Processor\MakeSharedIndexValid;
2221
use PHPUnit\Framework\MockObject\MockObject;
@@ -49,16 +48,9 @@ class ProcessorTest extends TestCase
4948
*/
5049
protected $viewProcessorMock;
5150

52-
/**
53-
* @var WorkingStateProvider|MockObject
54-
*/
55-
private $workingStateProvider;
5651

5752
protected function setUp(): void
5853
{
59-
$this->workingStateProvider = $this->getMockBuilder(WorkingStateProvider::class)
60-
->disableOriginalConstructor()
61-
->getMock();
6254
$this->configMock = $this->getMockForAbstractClass(
6355
ConfigInterface::class,
6456
[],
@@ -82,12 +74,19 @@ protected function setUp(): void
8274
'',
8375
false
8476
);
77+
78+
$indexerRegistryMock = $this->getIndexRegistryMock([]);
79+
$makeSharedValidMock = new MakeSharedIndexValid(
80+
$this->configMock,
81+
$indexerRegistryMock
82+
);
83+
8584
$this->model = new Processor(
8685
$this->configMock,
8786
$this->indexerFactoryMock,
8887
$this->indexersFactoryMock,
8988
$this->viewProcessorMock,
90-
$this->workingStateProvider
89+
$makeSharedValidMock
9190
);
9291
}
9392

@@ -187,7 +186,6 @@ function ($elem) {
187186
$this->indexerFactoryMock,
188187
$this->indexersFactoryMock,
189188
$this->viewProcessorMock,
190-
$this->workingStateProvider,
191189
$makeSharedValidMock
192190
);
193191
$model->reindexAllInvalid();

0 commit comments

Comments
 (0)