$this->run($this->argument);
} catch (\Exception $e) {
if ($logger) {
- $logger->error('Error while running background job: ' . $e->getMessage());
+ $logger->error('Error while running background job (class: ' . get_class($this) . ', arguments: ' . print_r($this->argument, true) . '): ' . $e->getMessage());
}
}
}
->getMock();
$logger->expects($this->once())
->method('error')
- ->with('Error while running background job: ');
+ ->with('Error while running background job (class: Test\BackgroundJob\TestJob, arguments: ): ');
$this->assertCount(1, $jobList->getAll());
$job->execute($jobList, $logger);