public function AgreementRevokeTestCase::testAgreement in Agreement 7.2
Asserts that a user that has agreed can revoke the agreement.
File
- ./
agreement.test, line 582 - Tests for Agreement module.
Class
- AgreementRevokeTestCase
- Tests revoke agreement functionality.
Code
public function testAgreement() {
$this
->revokeUserLogin();
// Try submitting agreement form.
$this
->submitAgreementFormWithAgreeing($this->revokeUser->uid);
// Revokes the agreement.
$this
->submitAgreementFormWithRevoking();
// Assert agreement page after revoking.
$this
->drupalGet('node/' . $this->node->nid);
$this
->isAgreementPage($this->agreement);
// Assert that the user can re-accept the agreement.
$this
->submitAgreementFormWithAgreeing($this->revokeUser->uid);
}