You are here

protected function AgreementRevokeTestCase::revokeUserLogin in Agreement 7.2

Creates an user with the "revoke own agreement" permission and login.

Parameters

string $destination: An optional destination to go to on login.

1 call to AgreementRevokeTestCase::revokeUserLogin()
AgreementRevokeTestCase::testAgreement in ./agreement.test
Asserts that a user that has agreed can revoke the agreement.

File

./agreement.test, line 615
Tests for Agreement module.

Class

AgreementRevokeTestCase
Tests revoke agreement functionality.

Code

protected function revokeUserLogin($destination = 'user') {
  $this->revokeUser = $this
    ->drupalCreateUser(array(
    'access content',
    'revoke own agreement',
  ));
  $this
    ->drupalLogin($this->revokeUser, $destination);
}