@@ -144,7 +144,8 @@ public function testLoadWithException()
144
144
public function testGetView ()
145
145
{
146
146
$ 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 ();
148
149
$ this ->loadIndexer ($ indexId );
149
150
150
151
$ this ->assertEquals ($ this ->viewMock , $ this ->model ->getView ());
@@ -224,11 +225,14 @@ public function testReindexAll()
224
225
$ indexId = 'indexer_internal_name ' ;
225
226
$ this ->loadIndexer ($ indexId );
226
227
228
+ $ this ->workingStateProvider ->method ('isWorking ' )->willReturnOnConsecutiveCalls (false , true );
229
+
227
230
$ stateMock = $ this ->createPartialMock (
228
231
State::class,
229
232
['load ' , 'getId ' , 'setIndexerId ' , '__wakeup ' , 'getStatus ' , 'setStatus ' , 'save ' ]
230
233
);
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 ();
232
236
$ stateMock ->expects ($ this ->never ())->method ('setIndexerId ' );
233
237
$ stateMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (1 );
234
238
$ stateMock ->expects ($ this ->exactly (2 ))->method ('setStatus ' )->willReturnSelf ();
@@ -268,7 +272,8 @@ public function testReindexAllWithException()
268
272
State::class,
269
273
['load ' , 'getId ' , 'setIndexerId ' , '__wakeup ' , 'getStatus ' , 'setStatus ' , 'save ' ]
270
274
);
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 ();
272
277
$ stateMock ->expects ($ this ->never ())->method ('setIndexerId ' );
273
278
$ stateMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (1 );
274
279
$ stateMock ->expects ($ this ->exactly (2 ))->method ('setStatus ' )->willReturnSelf ();
@@ -313,7 +318,8 @@ public function testReindexAllWithError()
313
318
State::class,
314
319
['load ' , 'getId ' , 'setIndexerId ' , '__wakeup ' , 'getStatus ' , 'setStatus ' , 'save ' ]
315
320
);
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 ();
317
323
$ stateMock ->expects ($ this ->never ())->method ('setIndexerId ' );
318
324
$ stateMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (1 );
319
325
$ stateMock ->expects ($ this ->exactly (2 ))->method ('setStatus ' )->willReturnSelf ();
@@ -483,7 +489,8 @@ public function testInvalidate()
483
489
);
484
490
485
491
$ 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 ();
487
494
$ stateMock ->expects ($ this ->once ())->method ('save ' )->willReturnSelf ();
488
495
$ this ->model ->invalidate ();
489
496
}
0 commit comments