public function AgreementAccessDeniedRedirectTest::testAccessDeniedRedirect in Agreement 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/AgreementAccessDeniedRedirectTest.php \Drupal\Tests\agreement\Functional\AgreementAccessDeniedRedirectTest::testAccessDeniedRedirect()
Asserts that the page is reached.
File
- tests/
src/ Functional/ AgreementAccessDeniedRedirectTest.php, line 31
Class
- AgreementAccessDeniedRedirectTest
- Tests that user is redirected when attempting to access privileged route.
Namespace
Drupal\Tests\agreement\FunctionalCode
public function testAccessDeniedRedirect() {
$this
->drupalLogin($this->unprivilegedUser);
$this
->assertAgreementPage($this->agreement);
$this
->drupalGet('/admin');
$this
->assertAgreementPage($this->agreement);
}