function CronQueueTest::testQueueWorkerDeriver
Same name in other branches
- 10 core/modules/system/tests/src/Kernel/System/CronQueueTest.php \Drupal\Tests\system\Kernel\System\CronQueueTest::testQueueWorkerDeriver()
Tests that cron queues from derivers work.
File
-
core/
modules/ system/ tests/ src/ Kernel/ System/ CronQueueTest.php, line 331
Class
- CronQueueTest
- Tests the Cron Queue runner.
Namespace
Drupal\Tests\system\Kernel\SystemCode
public function testQueueWorkerDeriver() : void {
$this->assertEquals(0, \Drupal::state()->get(CronQueueTestDeriverQueue::PLUGIN_ID, 0));
$queue = \Drupal::queue(sprintf('%s:foo', CronQueueTestDeriverQueue::PLUGIN_ID));
$queue->createItem('foo');
$this->cron
->run();
$this->assertEquals(1, \Drupal::state()->get(CronQueueTestDeriverQueue::PLUGIN_ID));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.