public function AgreementTestBase::assertNotAgreementPage in Agreement 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/AgreementTestBase.php \Drupal\Tests\agreement\Functional\AgreementTestBase::assertNotAgreementPage()
Assert that the current page is not the agreement page.
Parameters
\Drupal\agreement\Entity\Agreement $agreement: The agreement entity to assert.
14 calls to AgreementTestBase::assertNotAgreementPage()
- AgreementAnonymousTest::testAgreement in tests/
src/ Functional/ AgreementAnonymousTest.php - Tests agreement as anonymous user.
- AgreementBypassUserTest::testAgreement in tests/
src/ Functional/ AgreementBypassUserTest.php - Asserts no agreement for a user with the "bypass agreement" permission.
- AgreementCustomUnprivilegedUserTest::testAgreementFrequency in tests/
src/ Functional/ AgreementCustomUnprivilegedUserTest.php - Asserts the agreement frequency option.
- AgreementCustomUnprivilegedUserTest::testAgreementPages in tests/
src/ Functional/ AgreementCustomUnprivilegedUserTest.php - Asserts that agreement only functions on the front page.
- AgreementDefaultsPrivilegedUserTest::testAgreement in tests/
src/ Functional/ AgreementDefaultsPrivilegedUserTest.php - Asserts that the default settings work for the admin user.
File
- tests/
src/ Functional/ AgreementTestBase.php, line 162
Class
- AgreementTestBase
- Tests the agreement functionality.
Namespace
Drupal\Tests\agreement\FunctionalCode
public function assertNotAgreementPage(Agreement $agreement) {
$this
->assertStringEndsNotWith($agreement
->get('path'), $this
->getUrl(), 'URL is not agreement page.');
}