protected function AnonymousPrivateTempStoreTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php \Drupal\KernelTests\Core\TempStore\AnonymousPrivateTempStoreTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php \Drupal\KernelTests\Core\TempStore\AnonymousPrivateTempStoreTest::setUp()
Overrides KernelTestBase::setUp
File
- core/
tests/ Drupal/ KernelTests/ Core/ TempStore/ AnonymousPrivateTempStoreTest.php, line 32
Class
- AnonymousPrivateTempStoreTest
- Tests the PrivateTempStore for anonymous users.
Namespace
Drupal\KernelTests\Core\TempStoreCode
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',
]);
$request = Request::create('/');
$stack = $this->container
->get('request_stack');
$stack
->pop();
$stack
->push($request);
$this->tempStore = $this->container
->get('tempstore.private')
->get('anonymous_private_temp_store');
}