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/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php, line 55

Class

TempStoreDatabaseTest
Tests the temporary object storage system.

Namespace

Drupal\Tests\user\Kernel

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