Skip to content

Commit 7407329

Browse files
author
Stanislav Idolov
committed
#19541: Fixed unit test
1 parent af8cc0f commit 7407329

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ public function testDispatchExceptionTooLate()
354354
*/
355355
public function testDispatchExceptionNoCallback()
356356
{
357-
$exceptionMessage = 'No callbacks found';
357+
$jobName = 'test_job1';
358+
$exceptionMessage = 'No callbacks found for cron job ' . $jobName;
358359
$exception = new \Exception(__($exceptionMessage));
359360

360361
$dateScheduledAt = date('Y-m-d H:i:s', $this->time - 86400);
@@ -383,7 +384,7 @@ public function testDispatchExceptionNoCallback()
383384

384385
$this->loggerMock->expects($this->once())->method('critical')->with($exception);
385386

386-
$jobConfig = ['test_group' => ['test_job1' => ['instance' => 'Some_Class']]];
387+
$jobConfig = ['test_group' => [$jobName => ['instance' => 'Some_Class']]];
387388

388389
$this->_config->expects($this->exactly(2))->method('getJobs')->will($this->returnValue($jobConfig));
389390

0 commit comments

Comments
 (0)