protected function IsFrontPathCacheContextTest::createPathMatcher in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::createPathMatcher()
- 10 core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::createPathMatcher()
Creates a PathMatcherInterface prophecy.
Parameters
bool $is_front:
Return value
\Prophecy\Prophecy\ObjectProphecy
File
- core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ IsFrontPathCacheContextTest.php, line 38
Class
- IsFrontPathCacheContextTest
- @coversDefaultClass \Drupal\Core\Cache\Context\IsFrontPathCacheContext @group Cache
Namespace
Drupal\Tests\Core\Cache\ContextCode
protected function createPathMatcher($is_front) {
$path_matcher = $this
->prophesize(PathMatcherInterface::class);
$path_matcher
->isFrontPage()
->willReturn($is_front);
return $path_matcher;
}