1 simpletest.module simpletest_clean_profile_cache_folders()

Removes cached profile folders from the files directory.

File

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

Code

function simpletest_clean_profile_cache_folders() {
  $profiles = simpletest_get_profiles();

  $file_public_path = config_get('system.core', 'file_public_path', 'files');

  foreach ($profiles as $profile) {
    // Delete temporary files directory.
    file_unmanaged_delete_recursive($file_public_path . '/simpletest/simpletest_cache_' . $profile->name);
    backdrop_set_message(t('Cleared cache folder for profile !profile.', array('!profile' => $profile->name)));
  }
}