| 7 search.test | SearchEmbedForm::setUp() |
| 8 search.test | SearchEmbedForm::setUp() |
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix. A temporary files directory is created with the same name as the database prefix.
Parameters
...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.
Overrides DrupalWebTestCase::setUp
File
- modules/
search/ search.test, line 1844 - Tests for search.module.
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();
}
Login or register to post comments