You are here

public function MockRouteProvider::getRouteCollectionForRequest in Zircon Profile 8

Same name and namespace in other branches
  1. 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\Routing

Code

public function getRouteCollectionForRequest(Request $request) {
  return $this->routes;
}