AgreementDefaultsPrivilegedUserTest.php in Agreement 3.0.x
File
tests/src/Functional/AgreementDefaultsPrivilegedUserTest.php
View source
<?php
namespace Drupal\Tests\agreement\Functional;
class AgreementDefaultsPrivilegedUserTest extends AgreementTestBase {
public function testAgreement() {
$account = $this
->createPrivilegedUser();
$this
->drupalLogin($account);
$this
->drupalGet('admin/config/people/agreement/manage/default');
$this
->assertSession()
->titleEquals('Manage Agreement: Default agreement | Drupal');
$this
->drupalGet('/node');
$this
->assertNotAgreementPage($this->agreement);
$this
->drupalGet('/admin');
$this
->assertAgreementPage($this->agreement);
$this
->drupalGet('/node/add');
$this
->assertAgreementPage($this->agreement);
$this
->assertNotAgreed($this->agreement);
$this
->assertAgreed($this->agreement);
$this
->drupalGet('/admin');
$this
->assertNotAgreementPage($this->agreement);
}
}