function SearchEmbedForm::setUp

Overrides DrupalWebTestCase::setUp

File

modules/search/search.test, line 1890

Class

SearchEmbedForm
Tests that we can embed a form in search results and submit it.

Code

function setUp() {
    parent::setUp('search', 'search_embedded_form');
    // Create a user and a node, and update the search index.
    $test_user = $this->drupalCreateUser(array(
        'access content',
        'search content',
        'administer nodes',
    ));
    $this->drupalLogin($test_user);
    $this->node = $this->drupalCreateNode();
    node_update_index();
    search_update_totals();
    // Set up a dummy initial count of times the form has been submitted.
    $this->submit_count = 12;
    variable_set('search_embedded_form_submitted', $this->submit_count);
    $this->refreshVariables();
}

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