function TempStoreDatabaseTest::setUp

Same name in this branch
  1. 8.9.x core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php \Drupal\KernelTests\Core\TempStore\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();
    }
}

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