function UrlTest::setUpMockRouter
Reinitializes the router as a mock object.
4 calls to UrlTest::setUpMockRouter()
- UrlTest::testCreateFromRequest in core/
tests/ Drupal/ Tests/ Core/ UrlTest.php - Tests the createFromRequest method.
- UrlTest::testUrlFromRequest in core/
tests/ Drupal/ Tests/ Core/ UrlTest.php - Tests creating a URL from a request.
- UrlTest::testUrlFromRequestInvalid in core/
tests/ Drupal/ Tests/ Core/ UrlTest.php - Tests that an invalid request will thrown an exception.
- UrlTest::testUrlFromRequestWithQueryParameters in core/
tests/ Drupal/ Tests/ Core/ UrlTest.php - Tests creating a URL from a request with query parameters.
File
-
core/
tests/ Drupal/ Tests/ Core/ UrlTest.php, line 145
Class
- UrlTest
- Tests Drupal\Core\Url.
Namespace
Drupal\Tests\CoreCode
protected function setUpMockRouter() : void {
$this->router = $this->createMock(TestRouterInterface::class);
$this->container
->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.