You are here

protected function RequiredByRoleBasic::getNonRequiredUser in Required by role 7

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

Helper method to ghet a non-required user.

3 calls to RequiredByRoleBasic::getNonRequiredUser()
RequiredByRoleDateFieldWebTestCase::DotestIsNonRequiredRole in tests/required_by_role_test/RequiredByRoleDateFieldWebTestCase.test
Test for non-required role.
RequiredByRoleEmailFieldWebTestCase::testRequiredByRole in tests/required_by_role_test/RequiredByRoleEmailFieldWebTestCase.test
Test for both required and non-required roles.
RequiredByRoleImageFieldWebTestCase::testIsRequiredByRole in tests/required_by_role_test/RequiredByRoleImageFieldWebTestCase.test
Test for required and non-required roles

File

tests/required_by_role_test/RequiredByRoleBasic.test, line 77
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;
}