@@ -454,12 +454,10 @@ function () use (&$indexers) {
454
454
public function testReindexAllWithSharedIndexers ()
455
455
{
456
456
$ indexId = 'indexer_internal_name ' ;
457
-
458
457
// Ensure dependencies considered up-to-date so reset flag is true
459
458
$ this ->dependencyInfoProviderMock
460
459
->method ('getIndexerIdsToRunBefore ' )
461
460
->willReturn ([]);
462
-
463
461
// Configure current indexer config to have a shared_index
464
462
$ sharedIndex = 'shared_idx ' ;
465
463
$ this ->configMock
@@ -482,7 +480,6 @@ public function testReindexAllWithSharedIndexers()
482
480
default => ['shared_index ' => null ],
483
481
};
484
482
});
485
-
486
483
// Provide available indexers map for getSharedIndexers() iteration
487
484
$ this ->configMock
488
485
->method ('getIndexers ' )
@@ -492,7 +489,6 @@ public function testReindexAllWithSharedIndexers()
492
489
'indexer_b ' => [],
493
490
'indexer_c ' => [],
494
491
]);
495
-
496
492
// Prepare shared indexer mocks returned by factory
497
493
$ sharedIndexerA = $ this ->createMock (Indexer::class);
498
494
$ sharedViewA = $ this ->createMock (ViewInterface::class);
@@ -514,7 +510,6 @@ public function testReindexAllWithSharedIndexers()
514
510
->expects ($ this ->exactly (2 ))
515
511
->method ('create ' )
516
512
->willReturnOnConsecutiveCalls ($ sharedIndexerA , $ sharedIndexerB );
517
-
518
513
// Model state expectations
519
514
$ this ->workingStateProvider ->method ('isWorking ' )->willReturnOnConsecutiveCalls (false , true );
520
515
$ stateMock = $ this ->createPartialMock (
@@ -529,20 +524,17 @@ public function testReindexAllWithSharedIndexers()
529
524
$ stateMock ->expects ($ this ->any ())->method ('getStatus ' )->willReturn ('idle ' );
530
525
$ stateMock ->expects ($ this ->exactly (3 ))->method ('save ' )->willReturnSelf ();
531
526
$ this ->stateFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ stateMock );
532
-
533
527
// Current indexer view
534
528
$ this ->viewMock ->expects ($ this ->once ())->method ('isEnabled ' )->willReturn (true );
535
529
$ this ->viewMock ->expects ($ this ->once ())->method ('suspend ' );
536
530
$ this ->viewMock ->expects ($ this ->once ())->method ('resume ' );
537
-
538
531
// Action execution
539
532
$ actionMock = $ this ->createPartialMock (
540
533
ActionInterface::class,
541
534
['executeFull ' , 'executeList ' , 'executeRow ' ]
542
535
);
543
536
$ this ->actionFactoryMock ->expects ($ this ->once ())->method ('create ' )->with ('Some \\Class \\Name ' )
544
537
->willReturn ($ actionMock );
545
-
546
538
// Prepare model with ID set and required data
547
539
$ this ->model ->setId ($ indexId );
548
540
$ this ->model ->setData ([
0 commit comments