You are here

protected function TempStoreDatabaseTest::setUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/user/src/Tests/TempStoreDatabaseTest.php \Drupal\user\Tests\TempStoreDatabaseTest::setUp()

Performs setup tasks before each individual test method is run.

Overrides KernelTestBase::setUp

File

core/modules/user/src/Tests/TempStoreDatabaseTest.php, line 59
Contains \Drupal\user\Tests\TempStoreDatabaseTest.

Class

TempStoreDatabaseTest
Tests the temporary object storage system.

Namespace

Drupal\user\Tests

Code

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

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

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