diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 61905f2..8a4de0e 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -3499,12 +3499,13 @@ function drupal_check_memory_limit($required, $memory_limit = NULL) { function file_public_path() { $base_path = settings()->get('file_public_path', conf_path() . '/files'); if ($test_prefix = drupal_valid_test_ua()) { + // Append the testing suffix unless already given. // @see Drupal\simpletest\WebTestBase::setUp() - return $base_path . '/simpletest/' . substr($test_prefix, 10); - } - else { - return $base_path; + if (strpos($base_path, '/simpletest/' . substr($test_prefix, 10)) === FALSE) { + return $base_path . '/simpletest/' . substr($test_prefix, 10); + } } + return $base_path; } /** diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 8a28d64..285e809 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -803,6 +803,7 @@ protected function setUp() { NestedArray::setValue($GLOBALS['conf'], array_merge(array($config_base), explode('.', $name)), $value); } } + $this->settingsSet('file_public_path', $this->public_files_directory); // Execute the non-interactive installer. require_once DRUPAL_ROOT . '/core/includes/install.core.inc'; install_drupal($settings);