function CronQueueTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Kernel/System/CronQueueTest.php \Drupal\Tests\system\Kernel\System\CronQueueTest::setUp()
  2. 10 core/modules/system/tests/src/Kernel/System/CronQueueTest.php \Drupal\Tests\system\Kernel\System\CronQueueTest::setUp()
  3. 11.x core/modules/system/tests/src/Kernel/System/CronQueueTest.php \Drupal\Tests\system\Kernel\System\CronQueueTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/system/tests/src/Kernel/System/CronQueueTest.php, line 39

Class

CronQueueTest
Tests the Cron Queue runner.

Namespace

Drupal\Tests\system\Kernel\System

Code

protected function setUp() {
    parent::setUp();
    // These additional tables are necessary because $this->cron->run() calls
    // system_cron().
    $this->installSchema('system', [
        'key_value_expire',
    ]);
    $this->connection = Database::getConnection();
    $this->cron = \Drupal::service('cron');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.