diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php index 822e432..ad0a18e 100644 --- a/core/modules/simpletest/src/BrowserTestBase.php +++ b/core/modules/simpletest/src/BrowserTestBase.php @@ -929,9 +929,13 @@ public function installDrupal() { file_prepare_directory($this->privateFilesDirectory, FILE_CREATE_DIRECTORY); file_prepare_directory($this->tempFilesDirectory, FILE_CREATE_DIRECTORY); $config->getEditable('system.file') - ->set('path.private', $this->privateFilesDirectory) ->set('path.temporary', $this->tempFilesDirectory) ->save(); + $settings = []; + $settings['settings']['file_private_path'] = (object) [ + 'value' => $this->privateFilesDirectory, + 'required' => TRUE, + ]; // Manually configure the test mail collector implementation to prevent // tests from sending out emails and collect them in state instead. diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index fd7b864..8a73f82 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -1075,7 +1075,7 @@ public function __get($name) { return Settings::get('file_public_path', \Drupal::service('site.path') . '/files'); case 'private_files_directory': - return $this->container->get('config.factory')->get('system.file')->get('path.private'); + return Settings::get('file_private_path'); case 'temp_files_directory': return file_directory_temp();