Commit 598dc483 authored by Dries's avatar Dries

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

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