You are here

public function IsFrontPathCacheContextTest::testGetContextFront in Drupal 8

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

@covers ::getContext

File

core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php, line 18

Class

IsFrontPathCacheContextTest
@coversDefaultClass \Drupal\Core\Cache\Context\IsFrontPathCacheContext @group Cache

Namespace

Drupal\Tests\Core\Cache\Context

Code

public function testGetContextFront() {
  $cache_context = new IsFrontPathCacheContext($this
    ->createPathMatcher(TRUE)
    ->reveal());
  $this
    ->assertSame('is_front.1', $cache_context
    ->getContext());
}