You are here

protected function DrupalWebTestCase::preloadRegistry in SimpleTest 7

Same name and namespace in other branches
  1. 7.2 drupal_web_test_case.php \DrupalWebTestCase::preloadRegistry()

This method is called by DrupalWebTestCase::setUp, and preloads the registry from the testing site to cut down on the time it takes to setup a clean environment for the current test run.

1 call to DrupalWebTestCase::preloadRegistry()
DrupalWebTestCase::setUp in ./drupal_web_test_case.php
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

./drupal_web_test_case.php, line 1131

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function preloadRegistry() {
  db_query('INSERT INTO {registry} SELECT * FROM ' . $this->originalPrefix . 'registry');
  db_query('INSERT INTO {registry_file} SELECT * FROM ' . $this->originalPrefix . 'registry_file');
}