protected function IsFrontPathCacheContextTest::createPathMatcher in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::createPathMatcher()
- 9 core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php \Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::createPathMatcher()
Creates a PathMatcherInterface prophecy.
Parameters
bool $is_front: Whether the page is the front page.
Return value
\Prophecy\Prophecy\ObjectProphecy
File
- core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ IsFrontPathCacheContextTest.php, line 39
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;
}