You are here

function UUIDTestHelper::setUp in Universally Unique IDentifier 6

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

1 call to UUIDTestHelper::setUp()
UUIDTokenFunctionalityTestCase::setUp in ./uuid.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 UUIDTestHelper::setUp()
UUIDTokenFunctionalityTestCase::setUp in ./uuid.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

./uuid.test, line 12
Functionality tests for UUID module.

Class

UUIDTestHelper
Helper test class with some added functions for testing.

Code

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

  // Call parent::setUp() allowing test cases to pass further modules.
  $modules = array(
    'uuid',
  );
  if (isset($args[0]) && is_array($args[0])) {
    $modules = array_merge($modules, $args[0]);
  }
  $parent_callback = 'parent::setUp';
  if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    $parent_callback = array(
      $this,
      'parent::setUp',
    );
  }
  call_user_func_array($parent_callback, $modules);
}