AgreementAccessDeniedRedirectTest.php in Agreement 3.0.x
File
tests/src/Functional/AgreementAccessDeniedRedirectTest.php
View source
<?php
namespace Drupal\Tests\agreement\Functional;
class AgreementAccessDeniedRedirectTest extends AgreementTestBase {
protected $unprivilegedUser;
protected function setUp() : void {
parent::setUp();
$this->unprivilegedUser = $this
->createUnprivilegedUser();
}
public function testAccessDeniedRedirect() {
$this
->drupalLogin($this->unprivilegedUser);
$this
->assertAgreementPage($this->agreement);
$this
->drupalGet('/admin');
$this
->assertAgreementPage($this->agreement);
}
}