Issue #1512676 by swentel: Fixed Simpletest doesn't clean up the config directories generated by the configuration .
parent
4193c4ce26
commit
1a095dd602
|
@ -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) {
|
||||||
|
|
|
@ -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++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue