@@ -144,7 +144,8 @@ public function testLoadWithException()
144144 public function testGetView ()
145145 {
146146 $ indexId = 'indexer_internal_name ' ;
147- $ this ->viewMock ->expects ($ this ->once ())->method ('load ' )->with ('view_test ' )->willReturnSelf ();
147+ $ this ->viewMock ->expects ($ this ->once ())
148+ ->method ('load ' )->with ('view_test ' )->willReturnSelf ();
148149 $ this ->loadIndexer ($ indexId );
149150
150151 $ this ->assertEquals ($ this ->viewMock , $ this ->model ->getView ());
@@ -224,11 +225,14 @@ public function testReindexAll()
224225 $ indexId = 'indexer_internal_name ' ;
225226 $ this ->loadIndexer ($ indexId );
226227
228+ $ this ->workingStateProvider ->method ('isWorking ' )->willReturnOnConsecutiveCalls (false , true );
229+
227230 $ stateMock = $ this ->createPartialMock (
228231 State::class,
229232 ['load ' , 'getId ' , 'setIndexerId ' , '__wakeup ' , 'getStatus ' , 'setStatus ' , 'save ' ]
230233 );
231- $ stateMock ->expects ($ this ->once ())->method ('load ' )->with ($ indexId , 'indexer_id ' )->willReturnSelf ();
234+ $ stateMock ->expects ($ this ->once ())
235+ ->method ('load ' )->with ($ indexId , 'indexer_id ' )->willReturnSelf ();
232236 $ stateMock ->expects ($ this ->never ())->method ('setIndexerId ' );
233237 $ stateMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (1 );
234238 $ stateMock ->expects ($ this ->exactly (2 ))->method ('setStatus ' )->willReturnSelf ();
@@ -268,7 +272,8 @@ public function testReindexAllWithException()
268272 State::class,
269273 ['load ' , 'getId ' , 'setIndexerId ' , '__wakeup ' , 'getStatus ' , 'setStatus ' , 'save ' ]
270274 );
271- $ stateMock ->expects ($ this ->once ())->method ('load ' )->with ($ indexId , 'indexer_id ' )->willReturnSelf ();
275+ $ stateMock ->expects ($ this ->once ())
276+ ->method ('load ' )->with ($ indexId , 'indexer_id ' )->willReturnSelf ();
272277 $ stateMock ->expects ($ this ->never ())->method ('setIndexerId ' );
273278 $ stateMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (1 );
274279 $ stateMock ->expects ($ this ->exactly (2 ))->method ('setStatus ' )->willReturnSelf ();
@@ -313,7 +318,8 @@ public function testReindexAllWithError()
313318 State::class,
314319 ['load ' , 'getId ' , 'setIndexerId ' , '__wakeup ' , 'getStatus ' , 'setStatus ' , 'save ' ]
315320 );
316- $ stateMock ->expects ($ this ->once ())->method ('load ' )->with ($ indexId , 'indexer_id ' )->willReturnSelf ();
321+ $ stateMock ->expects ($ this ->once ())
322+ ->method ('load ' )->with ($ indexId , 'indexer_id ' )->willReturnSelf ();
317323 $ stateMock ->expects ($ this ->never ())->method ('setIndexerId ' );
318324 $ stateMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (1 );
319325 $ stateMock ->expects ($ this ->exactly (2 ))->method ('setStatus ' )->willReturnSelf ();
@@ -483,7 +489,8 @@ public function testInvalidate()
483489 );
484490
485491 $ this ->stateFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ stateMock );
486- $ stateMock ->expects ($ this ->once ())->method ('setStatus ' )->with (StateInterface::STATUS_INVALID )->willReturnSelf ();
492+ $ stateMock ->expects ($ this ->once ())
493+ ->method ('setStatus ' )->with (StateInterface::STATUS_INVALID )->willReturnSelf ();
487494 $ stateMock ->expects ($ this ->once ())->method ('save ' )->willReturnSelf ();
488495 $ this ->model ->invalidate ();
489496 }
0 commit comments