You are here

private function GoogleCSETestCase::setupGoogleCSEUser in Google Custom Search Engine 7.3

Same name and namespace in other branches
  1. 7.2 tests/google_cse.test \GoogleCSETestCase::setupGoogleCSEUser()

Since most tests need a user and Google CSE to be default search, abstract to function.

1 call to GoogleCSETestCase::setupGoogleCSEUser()
GoogleCSETestCase::testDisabledSearchModuleConfig in tests/google_cse.test
Tests all SiteSearch configuration options.

File

tests/google_cse.test, line 96
Google CSE module tests.

Class

GoogleCSETestCase
@file Google CSE module tests.

Code

private function setupGoogleCSEUser() {

  // Give the user all search permissions to use in testing.
  $this->privileged_user = $this
    ->drupalCreateUser(array(
    'search Google CSE',
    'administer Google CSE',
    'administer search',
    'search content',
    'use advanced search',
    'administer site configuration',
    'access administration pages',
    'view the administration theme',
    'bypass node access',
    'administer content types',
    'administer blocks',
  ));

  // Login user in order to edit config forms and use search.
  $this
    ->drupalLogin($this->privileged_user);
}