You are here

function RulesTestCase::setUp in Rules 6

Same name and namespace in other branches
  1. 8.3 d7-tests/rules_test_case.test \RulesTestCase::setUp()
  2. 7.2 tests/rules.test \RulesTestCase::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

rules_test/rules_test.test, line 16
Rules Testing Module - File containing test cases.

Class

RulesTestCase
@file Rules Testing Module - File containing test cases.

Code

function setUp() {
  parent::setUp();
  drupal_install_modules(array(
    'rules',
    'rules_test',
  ));
  rules_test_keep_rules_log();
}