You are here

public function SessionCacheContextTest::testContextWithoutSessionInRequest in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php \Drupal\Tests\Core\Cache\Context\SessionCacheContextTest::testContextWithoutSessionInRequest()
  2. 9 core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php \Drupal\Tests\Core\Cache\Context\SessionCacheContextTest::testContextWithoutSessionInRequest()

@covers ::getContext

File

core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php, line 90

Class

SessionCacheContextTest
@coversDefaultClass \Drupal\Core\Cache\Context\SessionCacheContext @group Cache

Namespace

Drupal\Tests\Core\Cache\Context

Code

public function testContextWithoutSessionInRequest() {
  $cache_context = new SessionCacheContext($this->requestStack);
  $this
    ->assertSame('none', $cache_context
    ->getContext());
}