AgreementRecordsViewsTest.php in Agreement 3.0.x
File
tests/src/Functional/AgreementRecordsViewsTest.php
View source
<?php
namespace Drupal\Tests\agreement\Functional;
class AgreementRecordsViewsTest extends AgreementTestBase {
public function testAgreementRecordsView() {
$unprivilegedUser = $this
->createUnprivilegedUser();
$this
->drupalLogin($unprivilegedUser);
$this
->assertAgreementPage($this->agreement);
$this
->assertAgreed($this->agreement);
$privilegedUser = $this
->createPrivilegedUser();
$this
->drupalLogin($privilegedUser);
$this
->drupalGet('/admin/config/people/agreement/agreements');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->pageTextContainsOnce('✔');
$this
->assertSession()
->pageTextContains('✖');
}
}