diff --git a/core/modules/system/src/Tests/File/StreamWrapperTest.php b/core/modules/system/src/Tests/File/StreamWrapperTest.php index 2f460f7..b96f288 100644 --- a/core/modules/system/src/Tests/File/StreamWrapperTest.php +++ b/core/modules/system/src/Tests/File/StreamWrapperTest.php @@ -7,8 +7,10 @@ namespace Drupal\system\Tests\File; +use Drupal\Core\DrupalKernel; use Drupal\Core\Site\Settings; use Drupal\Core\StreamWrapper\PublicStream; +use Symfony\Component\HttpFoundation\Request; /** * Tests stream wrapper functions. @@ -38,6 +40,17 @@ class StreamWrapperTest extends FileTestBase { */ protected $classname = 'Drupal\file_test\StreamWrapper\DummyStreamWrapper'; + function setUp() { + // Add file_private_path setting. + $settings = Settings::getAll(); + $request = Request::create('/');; + $site_path = DrupalKernel::findSitePath($request); + $settings['file_private_path'] = $site_path . '/private'; + new Settings($settings + Settings::getAll()); + + parent::setUp(); + } + /** * Test the getClassName() function. */