diff -u b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php --- b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -752,13 +752,18 @@ install_drupal($parameters); // Set the install_profile so that web requests to the requests to the child - // site have the correct profile. + // site have the correct profile. Set the file_private_path so that + // system_stream_wrappers() returns the correct stream wrappers. $settings = array( 'settings' => array( 'install_profile' => (object) array( 'value' => $this->profile, 'required' => TRUE, ), + 'file_private_path' => (object) array( + 'value' => $this->private_files_directory, + 'required' => TRUE, + ), ), ); $this->writeSettings($settings); diff -u b/core/modules/system/system.module b/core/modules/system/system.module --- b/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1914,7 +1914,7 @@ ); // Only register the private file stream wrapper if a file path has been set. - if (settings()->get('file_private_path')) { + if (\Drupal::config('system.file')->get('path.private')) { $wrappers['private'] = array( 'name' => t('Private files'), 'class' => 'Drupal\Core\StreamWrapper\PrivateStream', @@ -2116,7 +2116,7 @@ ); // Only register the private file stream wrapper if a file path has been set. - if (\Drupal::config('system.file')->get('path.private')) { + if (settings()->get('file_private_path')) { $wrappers['private'] = array( 'name' => t('Private files'), 'class' => 'Drupal\Core\StreamWrapper\PrivateStream', only in patch2: unchanged: --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemFile.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemFile.php @@ -27,10 +27,6 @@ public static function load(Connection $database) { 'value', )) ->values(array( - 'name' => 'file_directory_path', - 'value' => 's:10:"files/test";', - )) - ->values(array( 'name' => 'file_directory_temp', 'value' => 's:10:"files/temp";', )) only in patch2: unchanged: --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSystemConfigsTest.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSystemConfigsTest.php @@ -184,7 +184,6 @@ public function testSystemFile() { $old_state = \Drupal::configFactory()->getOverrideState(); \Drupal::configFactory()->setOverrideState(FALSE); $config = \Drupal::config('system.file'); - $this->assertIdentical($config->get('path.private'), 'files/test'); $this->assertIdentical($config->get('path.temporary'), 'files/temp'); \Drupal::configFactory()->setOverrideState($old_state); } only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php @@ -35,7 +35,6 @@ protected function setUp() { $variable_groups = array( 'system.file' => array( - 'path.private' => $this->private_files_directory, 'path.temporary' => $this->temp_files_directory, ), 'locale.settings' => array( only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Tests/InstallerTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/InstallerTest.php @@ -35,7 +35,6 @@ protected function setUp() { $variable_groups = array( 'system.file' => array( - 'path.private' => $this->private_files_directory, 'path.temporary' => $this->temp_files_directory, ), 'locale.settings' => array(