function SearchPageOverride::setUp

Overrides DrupalWebTestCase::setUp

File

modules/search/search.test, line 1958

Class

SearchPageOverride
Tests that hook_search_page runs.

Code

function setUp() {
    parent::setUp('search', 'search_extra_type');
    // Login as a user that can create and search content.
    $this->search_user = $this->drupalCreateUser(array(
        'search content',
        'administer search',
    ));
    $this->drupalLogin($this->search_user);
    // Enable the extra type module for searching.
    variable_set('search_active_modules', array(
        'node' => 'node',
        'user' => 'user',
        'search_extra_type' => 'search_extra_type',
    ));
    menu_rebuild();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.