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

8.0.x
catch 2012-04-07 11:40:36 +09:00
parent 4193c4ce26
commit 1a095dd602
2 changed files with 4 additions and 1 deletions

View File

@ -1547,6 +1547,9 @@ class DrupalWebTestCase extends DrupalTestCase {
// Delete temporary files directory. // Delete temporary files directory.
file_unmanaged_delete_recursive($this->originalFileDirectory . '/simpletest/' . substr($this->databasePrefix, 10)); 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). // Remove all prefixed tables (all the tables in the schema).
$schema = drupal_get_schema(NULL, TRUE); $schema = drupal_get_schema(NULL, TRUE);
foreach ($schema as $name => $table) { foreach ($schema as $name => $table) {

View File

@ -459,7 +459,7 @@ function simpletest_clean_temporary_directories() {
$files = scandir('public://simpletest'); $files = scandir('public://simpletest');
foreach ($files as $file) { foreach ($files as $file) {
$path = 'public://simpletest/' . $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); file_unmanaged_delete_recursive($path);
$count++; $count++;
} }