You are here

protected function DatabaseBackendTest::assertQueuedJob in Advanced Queue 8

Asserts that the queued job has the correct data.

Parameters

string $expected_id: The expected job ID.

string $expected_queue_id: The expected queue ID.

int $expected_delay: The expected delay.

\Drupal\advancedqueue\Job $job: The job.

2 calls to DatabaseBackendTest::assertQueuedJob()
DatabaseBackendTest::testFutureQueue in tests/src/Kernel/DatabaseBackendTest.php
@covers ::enqueueJob @covers ::claimJob
DatabaseBackendTest::testQueue in tests/src/Kernel/DatabaseBackendTest.php
@covers ::deleteQueue @covers ::countJobs @covers ::enqueueJob @covers ::enqueueJobs @covers ::claimJob @covers ::onSuccess @covers ::onFailure @covers ::deleteJob

File

tests/src/Kernel/DatabaseBackendTest.php, line 255

Class

DatabaseBackendTest
@coversDefaultClass \Drupal\advancedqueue\Plugin\AdvancedQueue\Backend\Database @group advancedqueue

Namespace

Drupal\Tests\advancedqueue\Kernel

Code

protected function assertQueuedJob($expected_id, $expected_queue_id, $expected_delay, Job $job) {
  $this
    ->assertEquals($expected_id, $job
    ->getId());
  $this
    ->assertEquals($expected_queue_id, $job
    ->getQueueId());
  $this
    ->assertEquals(Job::STATE_QUEUED, $job
    ->getState());
  $this
    ->assertEquals(635814000 + $expected_delay, $job
    ->getAvailableTime());
}