function CronTest::testProcessQueues
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/CronTest.php \Drupal\Tests\Core\CronTest::testProcessQueues()
- 11.x core/tests/Drupal/Tests/Core/CronTest.php \Drupal\Tests\Core\CronTest::testProcessQueues()
Tests the ::processQueues() method.
@covers ::processQueues @dataProvider processQueuesTestData
File
-
core/
tests/ Drupal/ Tests/ Core/ CronTest.php, line 181
Class
- CronTest
- Tests the Cron class.
Namespace
Drupal\Tests\CoreCode
public function testProcessQueues($item, $message_logged_assertion, $count_post_run) {
$this->resetTestingState();
$this->queue
->createItem($item);
$this->assertFalse($this->state
->get('cron_test.message_logged'));
$this->assertEquals(1, $this->queue
->numberOfItems());
$this->cron
->run();
$this->{$message_logged_assertion}($this->state
->get('cron_test.message_logged'));
$this->assertEquals($count_post_run, $this->queue
->numberOfItems());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.