You are here

public function AnonymousPrivateTempStoreTest::testAnonymousCanUsePrivateTempStoreGet in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php \Drupal\KernelTests\Core\TempStore\AnonymousPrivateTempStoreTest::testAnonymousCanUsePrivateTempStoreGet()
  2. 9 core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php \Drupal\KernelTests\Core\TempStore\AnonymousPrivateTempStoreTest::testAnonymousCanUsePrivateTempStoreGet()

Tests anonymous can get without a previous set.

File

core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php, line 46

Class

AnonymousPrivateTempStoreTest
Tests the PrivateTempStore for anonymous users.

Namespace

Drupal\KernelTests\Core\TempStore

Code

public function testAnonymousCanUsePrivateTempStoreGet() {
  $actual = $this->tempStore
    ->get('foo');
  $this
    ->assertNull($actual);
}