You are here

protected function RequiredByRoleBasic::getNonRequiredUser in Required by role 7.2

Same name and namespace in other branches
  1. 7 tests/required_by_role_test/RequiredByRoleBasic.test \RequiredByRoleBasic::getNonRequiredUser()

Helper method to ghet a non-required user.

File

tests/required_by_role_test/RequiredByRoleBasic.test, line 84
Tests for Required by role module.

Class

RequiredByRoleBasic
Base class for all required by role web test cases.

Code

protected function getNonRequiredUser() {
  $account = self::$non_required_user;
  if (is_null($account)) {
    $account = $this
      ->drupalCreateUser($this->basePermissions);
    self::$non_required_user = $account;
  }
  return $account;
}