You are here

protected function ip2countryTestCase::resetAll in IP-based Determination of a Visitor's Country 6

Backport of DrupalWebTestCase::resetAll() from Drupal 7.

Overrides DrupalWebTestCase::resetAll

1 call to ip2countryTestCase::resetAll()
ip2countryTestCase::setUp in ./ip2country.test
Overrides DrupalWebTestCase::setUp().

File

./ip2country.test, line 91
Tests suite for the ip2country module.

Class

ip2countryTestCase
Need 1 class for unit tests, 1 class for functional tests 1 function for DB tests because filling takes so long

Code

protected function resetAll() {

  // Reset cached schema for new database prefix. This must be done before
  // drupal_flush_all_caches() so rebuilds can make use of the schema of
  // modules enabled on the cURL side.
  drupal_get_schema(NULL, TRUE);

  // Perform rebuilds and flush remaining caches.
  actions_synchronize();
  _drupal_flush_css_js();
  menu_rebuild();

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

  // Drupal 6.
}