public function AgreementCustomUnprivilegedUserTestCase::testAgreement in Agreement 7.2
Same name and namespace in other branches
- 6.2 agreement.test \AgreementCustomUnprivilegedUserTestCase::testAgreement()
Tests the agreement page only on the front page.
File
- ./
agreement.test, line 310 - Tests for Agreement module.
Class
- AgreementCustomUnprivilegedUserTestCase
- Tests the agreement functionality with custom settings.
Code
public function testAgreement() {
$this->agreement['settings']['visibility_settings'] = 1;
$this->agreement['settings']['visibility_pages'] = '<front>';
$this->agreement = agreement_type_save($this->agreement);
$this
->unprivilegedUserLogin();
// Not sent to agreement page.
$this
->isNotAgreementPage($this->agreement);
// Go to front page, open agreement.
$this
->drupalGet('node');
$this
->isAgreementPage($this->agreement);
// Go anywhere else, no agreement.
$this
->drupalGet('user/' . $this->unprivilegedUser->uid);
$this
->isNotAgreementPage($this->agreement);
}