function IsFrontPathCacheContextTest::testGetContextNotFront

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::testGetContextNotFront()
  2. 10 core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::testGetContextNotFront()
  3. 9 core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::testGetContextNotFront()
  4. 8.9.x core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::testGetContextNotFront()

Tests get context not front.

File

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

Class

IsFrontPathCacheContextTest
Tests Drupal\Core\Cache\Context\IsFrontPathCacheContext.

Namespace

Drupal\Tests\Core\Cache\Context

Code

public function testGetContextNotFront() : void {
  $cache_context = new IsFrontPathCacheContext($this->createPathMatcher(FALSE)
    ->reveal());
  $this->assertSame('is_front.0', $cache_context->getContext());
}

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