You are here

function simpletest_uninstall in SimpleTest 7

Same name and namespace in other branches
  1. 8.3 simpletest.install \simpletest_uninstall()
  2. 6.2 simpletest.install \simpletest_uninstall()
  3. 7.2 simpletest.install \simpletest_uninstall()

Implement hook_uninstall().

File

./simpletest.install, line 102
Install, update and uninstall functions for the simpletest module.

Code

function simpletest_uninstall() {
  simpletest_clean_environment();

  // Remove settings variables.
  variable_del('simpletest_username');
  variable_del('simpletest_password');
  variable_del('simpletest_clear_results');
  variable_del('simpletest_verbose');

  // Remove generated files.
  $path = file_directory_path() . '/simpletest';
  $files = file_scan_directory($path, '/.*/');
  foreach ($files as $file) {
    file_unmanaged_delete($file->uri);
  }
  rmdir($path);
}