protected function OgRouteGroupResolverTestBase::willRetrieveCurrentPathFromRouteMatcher in Organic groups 8
Adds an expectation that the current path will be retrieved from the route.
Parameters
string $path: The path that will be retrieved.
1 call to OgRouteGroupResolverTestBase::willRetrieveCurrentPathFromRouteMatcher()
- OgRouteGroupResolverTestBase::testResolve in tests/
src/ Unit/ Plugin/ OgGroupResolver/ OgRouteGroupResolverTestBase.php - @todo Update documentation.
File
- tests/
src/ Unit/ Plugin/ OgGroupResolver/ OgRouteGroupResolverTestBase.php, line 155
Class
- OgRouteGroupResolverTestBase
- Base class for testing OgGroupResolver plugins that depend on the route.
Namespace
Drupal\Tests\og\Unit\Plugin\OgGroupResolverCode
protected function willRetrieveCurrentPathFromRouteMatcher($path) {
/** @var \Symfony\Component\Routing\Route|\Prophecy\Prophecy\ObjectProphecy $route */
$route = $this
->prophesize(Route::class);
$route
->getPath()
->willReturn($path)
->shouldBeCalled();
$this->routeMatch
->getRouteObject()
->willReturn($route
->reveal())
->shouldBeCalled();
}