public function MockRouteProvider::getRouteCollectionForRequest in Drupal 8
Same name and namespace in other branches
- 9 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.
File
- core/
modules/ system/ src/ Tests/ Routing/ MockRouteProvider.php, line 38
Class
- MockRouteProvider
- Easily configurable mock route provider.
Namespace
Drupal\system\Tests\RoutingCode
public function getRouteCollectionForRequest(Request $request) {
return $this->routes;
}