You are here

protected function SpacesOGTestCase::loginAdminUser in Spaces 6.3

Same name and namespace in other branches
  1. 7.3 spaces_og/tests/spaces_og.test \SpacesOGTestCase::loginAdminUser()
  2. 7 spaces_og/tests/spaces_og.test \SpacesOGTestCase::loginAdminUser()

Login a user with site building and spaces/features management permissions.

4 calls to SpacesOGTestCase::loginAdminUser()
SpacesOGTestAccess::testAccess in spaces_og/tests/spaces_og.test
Test access control lists. The purpose of this test is to verify that spaces presets result in proper OG settings. Further, resulting access grants and denies are tested to catch changes in OG API that potentially break assumed access walls.
SpacesOGTestAutocomplete::testAutocomplete in spaces_og/tests/spaces_og.test
Test autocomplete.
SpacesOGTestCase::setUp in spaces_og/tests/spaces_og.test
Set up test.
SpacesOGTestRouter::testRouter in spaces_og/tests/spaces_og.test
Test router.

File

spaces_og/tests/spaces_og.test, line 83

Class

SpacesOGTestCase
Base test class for Spaces OG tests.

Code

protected function loginAdminUser() {
  if (empty($this->admin_user)) {
    $this->admin_user = $this
      ->drupalCreateUser(array(
      'access content',
      'administer nodes',
      'administer content types',
      'administer site configuration',
      // Necessary for rebuilding node_access permissions.
      'access administration pages',
      'administer spaces',
      'administer organic groups',
    ));
  }
  $this
    ->drupalLogin($this->admin_user);
}