public function MockRouteProvider::getRouteCollectionForRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::getRouteCollectionForRequest()
Implements \Symfony\Cmf\Component\Routing\RouteProviderInterface::getRouteCollectionForRequest().
Simply return all routes to prevent \Symfony\Component\Routing\Exception\ResourceNotFoundException.
Overrides RouteProviderInterface::getRouteCollectionForRequest
File
- core/
modules/ system/ src/ Tests/ Routing/ MockRouteProvider.php, line 43 - Contains \Drupal\system\Tests\Routing\MockRouteProvider.
Class
- MockRouteProvider
- Easily configurable mock route provider.
Namespace
Drupal\system\Tests\RoutingCode
public function getRouteCollectionForRequest(Request $request) {
return $this->routes;
}