Skip to content

Commit 196025f

Browse files
committed
MCP-89: Move product batch size variable to environment
1 parent 1b247eb commit 196025f

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

app/code/Magento/Indexer/Test/Unit/Console/Command/IndexerReindexCommandTest.php

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -422,27 +422,6 @@ public function executeWithIndexDataProvider()
422422
];
423423
}
424424

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-
446425
public function testExecuteWithException()
447426
{
448427
$this->configureAdminArea();
@@ -459,7 +438,10 @@ public function testExecuteWithException()
459438
$commandTester->execute(['index' => ['indexer_1']]);
460439
$actualValue = $commandTester->getDisplay();
461440
$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+
);
463445
}
464446

465447
public function testExecuteWithExceptionInGetIndexers()

0 commit comments

Comments
 (0)