function PathValidatorTest::setUpMockAccount
Reinitializes the account as a mock object.
13 calls to PathValidatorTest::setUpMockAccount()
- 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 98
Class
Namespace
Drupal\Tests\Core\PathCode
protected function setUpMockAccount() : void {
$this->account = $this->createMock(AccountInterface::class);
$reflection = new \ReflectionProperty($this->pathValidator, 'account');
$reflection->setValue($this->pathValidator, $this->account);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.