You are here

protected function PasswordPolicyExpirationTestCase::assignToNewRole in Password Policy 7

Assigns user to a newly created role.

Parameters

object $account: User object.

Return value

int Role ID of newly created role.

1 call to PasswordPolicyExpirationTestCase::assignToNewRole()
PasswordPolicyExpirationTestCase::testUnblockingExpiredAccountViaUserEditForm in tests/password_policy_expiration.test
Tests unblocking an expired account via user edit form.

File

tests/password_policy_expiration.test, line 576
Tests for Password policy module expiration functionality.

Class

PasswordPolicyExpirationTestCase
Tests of password expiration.

Code

protected function assignToNewRole($account) {
  $expiration_rid = $this
    ->drupalCreateRole(array());
  user_multiple_role_edit(array(
    $account->uid,
  ), 'add_role', $expiration_rid);
  return $expiration_rid;
}