You are here

protected function TempStoreDatabaseTest::setUp in Drupal 8

Same name in this branch
  1. 8 core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php \Drupal\KernelTests\Core\TempStore\TempStoreDatabaseTest::setUp()
  2. 8 core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php \Drupal\Tests\user\Kernel\TempStoreDatabaseTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php, line 47

Class

TempStoreDatabaseTest
Tests the temporary object storage system.

Namespace

Drupal\KernelTests\Core\TempStore

Code

protected function setUp() {
  parent::setUp();

  // Install system tables to test the key/value storage without installing a
  // full Drupal environment.
  $this
    ->installSchema('system', [
    'key_value_expire',
  ]);

  // Create several objects for testing.
  for ($i = 0; $i <= 3; $i++) {
    $this->objects[$i] = $this
      ->randomObject();
  }
}