summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2010-09-25 01:50:07 (GMT)
committerDries Buytaert2010-09-25 01:50:07 (GMT)
commita74c3c0a4630c54733b7dbe5cc3130d49b4a47ca (patch)
treec3cdcc201afd95331092b1c35a2de1290a34ddf7
parent07886a84821909a48dd40819a9584aa7f483dfe0 (diff)
- Patch #922062 by solotandem: test directory not created with DrupalUnitTestCase.
-rw-r--r--modules/simpletest/drupal_web_test_case.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 16076d7..b6c9016 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -603,7 +603,11 @@ class DrupalUnitTestCase extends DrupalTestCase {
// Generate temporary prefixed database to ensure that tests have a clean starting point.
$this->databasePrefix = Database::getConnection()->prefixTables('{simpletest' . mt_rand(1000, 1000000) . '}');
- $conf['file_public_path'] = $this->originalFileDirectory . '/' . $this->databasePrefix;
+
+ // Create test directory.
+ $public_files_directory = $this->originalFileDirectory . '/simpletest/' . substr($this->databasePrefix, 10);
+ file_prepare_directory($public_files_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+ $conf['file_public_path'] = $public_files_directory;
// Clone the current connection and replace the current prefix.
$connection_info = Database::getConnectionInfo('default');