You are here

public function FeedsTamperWebTestHelper::setUp in Feeds Tamper 6

Same name and namespace in other branches
  1. 7 tests/feeds_tamper.test \FeedsTamperWebTestHelper::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 FeedsWebTestCase::setUp

1 call to FeedsTamperWebTestHelper::setUp()
FeedsTamperUIWebTestCase::setUp in feeds_tamper_ui/tests/feeds_tamper_ui.test
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.…
1 method overrides FeedsTamperWebTestHelper::setUp()
FeedsTamperUIWebTestCase::setUp in feeds_tamper_ui/tests/feeds_tamper_ui.test
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.…

File

tests/feeds_tamper.test, line 13
Tests for feeds_tamper.module.

Class

FeedsTamperWebTestHelper
Base class for Feeds Tamper tests.

Code

public function setUp() {
  $args = func_get_args();

  // Build the list of required modules which can be altered by passing in an
  // array of module names to setUp().
  if (isset($args[0])) {
    if (is_array($args[0])) {
      $modules = $args[0];
    }
    else {
      $modules = $args;
    }
  }
  else {
    $modules = array();
  }
  if (isset($args[1]) && is_array($args[1])) {
    $permissions = $args[1];
  }
  else {
    $permissions = array();
  }
  $modules[] = 'feeds_tamper';
  parent::setUp($modules, $permissions);
}