AgreementDefaultsUnprivilegedUserTest.php in Agreement 3.0.x
File
tests/src/Functional/AgreementDefaultsUnprivilegedUserTest.php
View source
<?php
namespace Drupal\Tests\agreement\Functional;
class AgreementDefaultsUnprivilegedUserTest extends AgreementTestBase {
public function testAgreement() {
$account = $this
->createUnprivilegedUser();
$this
->drupalLogin($account);
$this
->assertAgreementPage($this->agreement);
$this
->drupalGet('/node');
$this
->assertNotAgreementPage($this->agreement);
$this
->drupalGet('/user/' . $account
->id());
$this
->assertAgreementPage($this->agreement);
$this
->assertNotAgreed($this->agreement);
$this
->assertAgreementPage($this->agreement);
$this
->drupalGet('/admin/config/people/agreement');
$this
->assertSession()
->statusCodeEquals(403);
}
}