You are here

function DatabaseTestCase::setUp in SimpleTest 7

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.

Overrides DrupalWebTestCase::setUp

4 calls to DatabaseTestCase::setUp()
DatabaseAnsiSyntaxTestCase::setUp in tests/database_test.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.…
DatabaseFetch2TestCase::setUp in tests/database_test.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.…
DatabaseInvalidDataTestCase::setUp in tests/database_test.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.…
DatabaseQueryTestCase::setUp in tests/database_test.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.…
4 methods override DatabaseTestCase::setUp()
DatabaseAnsiSyntaxTestCase::setUp in tests/database_test.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.…
DatabaseFetch2TestCase::setUp in tests/database_test.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.…
DatabaseInvalidDataTestCase::setUp in tests/database_test.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.…
DatabaseQueryTestCase::setUp in tests/database_test.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/database_test.test, line 20

Class

DatabaseTestCase
Base test class for databases.

Code

function setUp() {
  parent::setUp('database_test');
  $schema['test'] = drupal_get_schema('test');
  $schema['test_people'] = drupal_get_schema('test_people');
  $schema['test_one_blob'] = drupal_get_schema('test_one_blob');
  $schema['test_two_blobs'] = drupal_get_schema('test_two_blobs');
  $schema['test_task'] = drupal_get_schema('test_task');
  $this
    ->installTables($schema);
  $this
    ->addSampleData();
}