- Patch #335756 by Damien Tournoud, hass: fixed simpletest file directory path.

merge-requests/26/head
Dries Buytaert 2009-04-25 13:40:41 +00:00
parent 39f2651669
commit 598dc48357
1 changed files with 2 additions and 2 deletions

View File

@ -831,6 +831,7 @@ class DrupalWebTestCase {
// Store necessary current values before switching to prefixed database.
$this->originalPrefix = $db_prefix;
$this->originalFileDirectory = file_directory_path();
$clean_url_original = variable_get('clean_url', 0);
// Generate temporary prefixed database to ensure that tests have a clean starting point.
@ -874,8 +875,7 @@ class DrupalWebTestCase {
variable_set('site_mail', 'simpletest@example.com');
// Use temporary files directory with the same prefix as database.
$this->originalFileDirectory = file_directory_path();
variable_set('file_directory_path', file_directory_path() . '/' . $db_prefix);
variable_set('file_directory_path', $this->originalFileDirectory . '/' . $db_prefix);
$directory = file_directory_path();
// Create the files directory.
file_check_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);