You are here

public function JobResultTest::testFailure in Advanced Queue 8

@covers ::failure @covers ::getState @covers ::getMessage @covers ::getMaxRetries @covers ::getRetryDelay

File

tests/src/Unit/JobResultTest.php, line 33

Class

JobResultTest
@coversDefaultClass \Drupal\advancedqueue\JobResult @group advancedqueue

Namespace

Drupal\Tests\advancedqueue\Unit

Code

public function testFailure() {
  $result = JobResult::failure('DB down');
  $this
    ->assertEquals(Job::STATE_FAILURE, $result
    ->getState());
  $this
    ->assertEquals('DB down', $result
    ->getMessage());
  $this
    ->assertNull($result
    ->getMaxRetries());
  $this
    ->assertNull($result
    ->getRetryDelay());
}