public function JobResultTest::testFailureWithRetryOverride in Advanced Queue 8
@covers ::failure @covers ::getState @covers ::getMessage @covers ::getMaxRetries @covers ::getRetryDelay
File
- tests/
src/ Unit/ JobResultTest.php, line 48
Class
- JobResultTest
- @coversDefaultClass \Drupal\advancedqueue\JobResult @group advancedqueue
Namespace
Drupal\Tests\advancedqueue\UnitCode
public function testFailureWithRetryOverride() {
$result = JobResult::failure('DB down', 2, 10);
$this
->assertEquals(Job::STATE_FAILURE, $result
->getState());
$this
->assertEquals('DB down', $result
->getMessage());
$this
->assertEquals(2, $result
->getMaxRetries());
$this
->assertEquals(10, $result
->getRetryDelay());
}