Skip to content

Commit db07949

Browse files
committed
Fix unit test
1 parent 5081a1a commit db07949

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,12 @@ public function testIsScheduled()
419419
*/
420420
public function testSetScheduled($scheduled, $method)
421421
{
422-
$stateMock = $this->createPartialMock(State::class, ['load', 'save']);
422+
$stateMock = $this->createPartialMock(State::class, ['load', 'save', 'setStatus']);
423423

424424
$this->stateFactoryMock->expects($this->once())->method('create')->willReturn($stateMock);
425425
$this->viewMock->expects($this->once())->method('load')->willReturnSelf();
426-
$this->viewMock->expects($this->once())->method($method)->willReturn(true);
427-
$stateMock->expects($this->once())->method('save')->willReturnSelf();
426+
$this->viewMock->expects($this->once())->method($method)->willReturnSelf();
427+
$stateMock->expects($this->atLeastOnce())->method('save')->willReturnSelf();
428428
if (!$scheduled) {
429429
$stateMock->expects($this->once())
430430
->method('setStatus')

0 commit comments

Comments
 (0)