Commit 1a095dd6 authored by catch's avatar catch

Issue #1512676 by swentel: Fixed Simpletest doesn't clean up the config...

Issue #1512676 by swentel: Fixed Simpletest doesn't clean up the config directories generated by the configuration .
parent 4193c4ce
......@@ -1547,6 +1547,9 @@ protected function tearDown() {
// Delete temporary files directory.
file_unmanaged_delete_recursive($this->originalFileDirectory . '/simpletest/' . substr($this->databasePrefix, 10));
// Delete temporary config files directory.
file_unmanaged_delete_recursive($this->originalFileDirectory . '/simpletest/config_simpletest' . substr($this->databasePrefix, 10));
// Remove all prefixed tables (all the tables in the schema).
$schema = drupal_get_schema(NULL, TRUE);
foreach ($schema as $name => $table) {
......
......@@ -459,7 +459,7 @@ function simpletest_clean_temporary_directories() {
$files = scandir('public://simpletest');
foreach ($files as $file) {
$path = 'public://simpletest/' . $file;
if (is_dir($path) && is_numeric($file)) {
if (is_dir($path) && (is_numeric($file) || strpos($file, 'config_simpletest') !== FALSE)) {
file_unmanaged_delete_recursive($path);
$count++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment