function IsFrontPathCacheContextTest::createPathMatcher
Creates a PathMatcherInterface prophecy.
Parameters
bool $is_front: Whether the page is the front page.
Return value
\Prophecy\Prophecy\ObjectProphecy<\Drupal\Core\Path\PathMatcherInterface> The path matcher prophecy.
File
- 
              core/tests/ Drupal/ Tests/ Core/ Cache/ Context/ IsFrontPathCacheContextTest.php, line 50 
Class
Namespace
Drupal\Tests\Core\Cache\ContextCode
protected function createPathMatcher($is_front) : ObjectProphecy {
  $path_matcher = $this->prophesize(PathMatcherInterface::class);
  $path_matcher->isFrontPage()
    ->willReturn($is_front);
  return $path_matcher;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
