Skip to content

AssertQueueTrait

Provides assertions for running queues.


  • Full name: \Drupal\helper\Tests\AssertQueueTrait

Methods

assertQueueSize

Assert a queue size.

protected assertQueueSize(string $queue_name, int $expected_size): mixed

Parameters:

Parameter Type Description
$queue_name string
The queue name.
$expected_size int
The expected size of the queue.

assertQueueRun

Assert running a queue.

protected assertQueueRun(string $queue_name, int $assert_count_before = null, int $assert_count_after = 0, int $time_limit = 300): mixed

Parameters:

Parameter Type Description
$queue_name string
The queue name.
$assert_count_before int
The number of items to assert are in the queue before running. Use NULL
to skip this assertion.
$assert_count_after int
The number of items to assert are in the queue after running. Use NULL
to skip this assertion. Defaults to zero items (an empty queue).
$time_limit int
The number of seconds to limit running the queue. Defaults to 5 minutes.