1 simpletest.module simpletest_clean_environment()

Remove all temporary database tables and directories.

File

core/modules/simpletest/simpletest.module, line 482
Provides testing functionality.

Code

function simpletest_clean_environment() {
  simpletest_clean_database();
  simpletest_clean_temporary_directories();
  simpletest_clean_profile_cache_tables();
  simpletest_clean_profile_cache_folders();
  if (config_get('simpletest.settings', 'simpletest_clear_results')) {
    $count = simpletest_clean_results_table();
    backdrop_set_message(format_plural($count, 'Removed 1 test result.', 'Removed @count test results.'));
  }
  else {
    backdrop_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.
  cache()->delete('simpletest');
}