function RoutePreloaderTest::setUpMockRouteProvider
Reinitializes the route provider as a mock object.
2 calls to RoutePreloaderTest::setUpMockRouteProvider()
- RoutePreloaderTest::testOnRequestNonHtml in core/
tests/ Drupal/ Tests/ Core/ Routing/ RoutePreloaderTest.php - Tests onRequest on a non html request.
- RoutePreloaderTest::testOnRequestOnHtml in core/
tests/ Drupal/ Tests/ Core/ Routing/ RoutePreloaderTest.php - Tests onRequest on a html request.
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ RoutePreloaderTest.php, line 60
Class
Namespace
Drupal\Tests\Core\RoutingCode
protected function setUpMockRouteProvider() : void {
$this->routeProvider = $this->createMock(PreloadableRouteProviderInterface::class);
$reflection = new \ReflectionProperty($this->preloader, 'routeProvider');
$reflection->setValue($this->preloader, $this->routeProvider);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.