You are here

protected function CronQueueTest::setUp in Drupal 8

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()

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');
}