You are here

protected function DrupalWebTestCase::resetAll in SimpleTest 6.2

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

Reset all data structures after having enabled new modules.

This method is called by DrupalWebTestCase::setUp() after enabling the requested modules. It must be called again when additional modules are enabled later.

1 call to DrupalWebTestCase::resetAll()
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 1322

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function resetAll() {

  // Rebuild caches.
  drupal_flush_all_caches();
  actions_synchronize();
  user_access(NULL, NULL, TRUE);

  // Reload global $conf array and permissions.
  $this
    ->refreshVariables();
  $this
    ->checkPermissions(array(), TRUE);

  // Reset statically cached schema for new database prefix.
  drupal_get_schema(NULL, TRUE);
}