Skip to content

Commit 76fb01d

Browse files
committed
IndexerInterface::isAvailable() should consider dimensions to support partial fulltext reindex. Fix Unit tests
1 parent 90225a4 commit 76fb01d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public function testExecute()
116116
->willReturn($ids);
117117
$this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex');
118118
$this->saveHandler->expects($this->exactly(2))->method('saveIndex');
119+
$this->saveHandler->expects($this->exactly(2))->method('isAvailable')->willReturn(true);
119120
$consecutiveStoreRebuildArguments = array_map(
120121
function ($store) use ($ids) {
121122
return [$store, $ids];
@@ -186,6 +187,7 @@ public function testExecuteList()
186187
->willReturn($ids);
187188
$this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex');
188189
$this->saveHandler->expects($this->exactly(2))->method('saveIndex');
190+
$this->saveHandler->expects($this->exactly(2))->method('isAvailable')->willReturn(true);
189191
$this->fullAction->expects($this->exactly(2))
190192
->method('rebuildStoreIndex')
191193
->willReturn(new \ArrayObject([$indexData, $indexData]));
@@ -204,6 +206,7 @@ public function testExecuteRow()
204206
->willReturn([$id]);
205207
$this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex');
206208
$this->saveHandler->expects($this->exactly(2))->method('saveIndex');
209+
$this->saveHandler->expects($this->exactly(2))->method('isAvailable')->willReturn(true);
207210
$this->fullAction->expects($this->exactly(2))
208211
->method('rebuildStoreIndex')
209212
->willReturn(new \ArrayObject([$indexData, $indexData]));

0 commit comments

Comments
 (0)