@@ -422,27 +422,6 @@ public function executeWithIndexDataProvider()
422
422
];
423
423
}
424
424
425
- public function testExecuteWithLocalizedException ()
426
- {
427
- $ this ->configureAdminArea ();
428
- $ indexerOne = $ this ->getIndexerMock (
429
- ['reindexAll ' , 'getStatus ' ],
430
- ['indexer_id ' => 'indexer_1 ' , 'title ' => self ::STUB_INDEXER_NAME ]
431
- );
432
- $ localizedException = new LocalizedException (new Phrase ('Some Exception Message ' ));
433
- $ indexerOne ->expects ($ this ->once ())->method ('reindexAll ' )->willThrowException ($ localizedException );
434
- $ this ->initIndexerCollectionByItems ([$ indexerOne ]);
435
- $ this ->command = new IndexerReindexCommand ($ this ->objectManagerFactory );
436
- $ commandTester = new CommandTester ($ this ->command );
437
- $ commandTester ->execute (['index ' => ['indexer_1 ' ]]);
438
- $ actualValue = $ commandTester ->getDisplay ();
439
- $ this ->assertSame (Cli::RETURN_FAILURE , $ commandTester ->getStatusCode ());
440
- $ this ->assertStringStartsWith (
441
- self ::STUB_INDEXER_NAME . ' index exception: Some Exception Message ' ,
442
- $ actualValue
443
- );
444
- }
445
-
446
425
public function testExecuteWithException ()
447
426
{
448
427
$ this ->configureAdminArea ();
@@ -459,7 +438,10 @@ public function testExecuteWithException()
459
438
$ commandTester ->execute (['index ' => ['indexer_1 ' ]]);
460
439
$ actualValue = $ commandTester ->getDisplay ();
461
440
$ this ->assertSame (Cli::RETURN_FAILURE , $ commandTester ->getStatusCode ());
462
- $ this ->assertStringStartsWith ('Title_indexer_1 ' . ' index process unknown error: ' , $ actualValue );
441
+ $ this ->assertStringStartsWith (
442
+ 'Title_indexer_1 ' . ' index process error during indexation process: ' ,
443
+ $ actualValue
444
+ );
463
445
}
464
446
465
447
public function testExecuteWithExceptionInGetIndexers ()
0 commit comments