simpletest_clean_environment

Versions
7
simpletest_clean_environment()

Remove all temporary database tables and directories.

Code

modules/simpletest/simpletest.module, line 402

<?php
function simpletest_clean_environment() {
  simpletest_clean_database();
  simpletest_clean_temporary_directories();
  if (variable_get('simpletest_clear_results', TRUE)) {
    $count = simpletest_clean_results_table();
    drupal_set_message(format_plural($count, 'Removed 1 test result.', 'Removed @count test results.'));
  }
  else {
    drupal_set_message(t('Clear results is disabled and the test results table will not be cleared.'), 'warning');
  }

  // Detect test classes that have been added, renamed or deleted.
  registry_rebuild();
  cache_clear_all('simpletest', 'cache');
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.