function PathValidatorTest::setUpMockAccessAwareRouter
Reinitializes the access aware router as a mock object.
17 calls to PathValidatorTest::setUpMockAccessAwareRouter()
- PathValidatorTest::testGetUrlIfValidWithAccess in core/
tests/ Drupal/ Tests/ Core/ Path/ PathValidatorTest.php - Tests the getUrlIfValid() method when there is access.
- PathValidatorTest::testGetUrlIfValidWithoutAccess in core/
tests/ Drupal/ Tests/ Core/ Path/ PathValidatorTest.php - Tests the getUrlIfValid() method where there is no access.
- PathValidatorTest::testGetUrlIfValidWithoutAccessCheck in core/
tests/ Drupal/ Tests/ Core/ Path/ PathValidatorTest.php - Tests the getUrlIfValidWithoutAccessCheck() method.
- PathValidatorTest::testGetUrlIfValidWithQuery in core/
tests/ Drupal/ Tests/ Core/ Path/ PathValidatorTest.php - Tests the getUrlIfValid() method with a query in the path.
- PathValidatorTest::testIsValidWithAccessDenied in core/
tests/ Drupal/ Tests/ Core/ Path/ PathValidatorTest.php - Tests the isValid() method with a user without access to the path.
File
-
core/
tests/ Drupal/ Tests/ Core/ Path/ PathValidatorTest.php, line 80
Class
Namespace
Drupal\Tests\Core\PathCode
protected function setUpMockAccessAwareRouter() : void {
$this->accessAwareRouter = $this->createMock(AccessAwareRouterInterface::class);
$reflection = new \ReflectionProperty($this->pathValidator, 'accessAwareRouter');
$reflection->setValue($this->pathValidator, $this->accessAwareRouter);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.