function RoutePreloaderTest::testOnRequestNonHtml
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php \Drupal\Tests\Core\Routing\RoutePreloaderTest::testOnRequestNonHtml()
- 10 core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php \Drupal\Tests\Core\Routing\RoutePreloaderTest::testOnRequestNonHtml()
- 11.x core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php \Drupal\Tests\Core\Routing\RoutePreloaderTest::testOnRequestNonHtml()
Tests onRequest on a non html request.
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ RoutePreloaderTest.php, line 141
Class
- RoutePreloaderTest
- @coversDefaultClass \Drupal\Core\Routing\RoutePreloader @group Routing
Namespace
Drupal\Tests\Core\RoutingCode
public function testOnRequestNonHtml() {
$event = $this->getMockBuilder('\\Symfony\\Component\\HttpKernel\\Event\\KernelEvent')
->disableOriginalConstructor()
->getMock();
$request = new Request();
$request->setRequestFormat('non-html');
$event->expects($this->any())
->method('getRequest')
->willReturn($request);
$this->routeProvider
->expects($this->never())
->method('getRoutesByNames');
$this->state
->expects($this->never())
->method('get');
$this->preloader
->onRequest($event);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.