function IsFrontPathCacheContextTest::testGetContextNotFront
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::testGetContextNotFront()
- 10 core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::testGetContextNotFront()
- 11.x core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::testGetContextNotFront()
@covers ::getContext
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ IsFrontPathCacheContextTest.php, line 26
Class
- IsFrontPathCacheContextTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Cache%21Context%21IsFrontPathCacheContext.php/class/IsFrontPathCacheContext/9" title="Defines a cache context for whether the URL is the front page of the site." class="local">\Drupal\Core\Cache\Context\IsFrontPathCacheContext</a> @group Cache
Namespace
Drupal\Tests\Core\Cache\ContextCode
public function testGetContextNotFront() {
$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.