function UnroutedUrlTest::setUpMockRouter
Reinitializes the router as a mock object.
1 call to UnroutedUrlTest::setUpMockRouter()
- UnroutedUrlTest::testCreateFromRequest in core/
tests/ Drupal/ Tests/ Core/ UnroutedUrlTest.php - Tests the createFromRequest method.
File
-
core/
tests/ Drupal/ Tests/ Core/ UnroutedUrlTest.php, line 75
Class
- UnroutedUrlTest
- Tests Drupal\Core\Url.
Namespace
Drupal\Tests\CoreCode
protected function setUpMockRouter() : void {
$this->router = $this->createMock(TestRouterInterface::class);
\Drupal::getContainer()->set('router.no_access_checks', $this->router);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.