function StreamWrapperTest::setUp

Same name in other branches
  1. 7.x modules/simpletest/tests/file.test \StreamWrapperTest::setUp()
  2. 9 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::setUp()
  3. 8.9.x core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::setUp()
  4. 10 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::setUp()

Overrides FileTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php, line 43

Class

StreamWrapperTest
Tests stream wrapper functions.

Namespace

Drupal\KernelTests\Core\File

Code

protected function setUp() : void {
    parent::setUp();
    // Add file_private_path setting.
    $request = Request::create('/');
    $site_path = DrupalKernel::findSitePath($request);
    $this->setSetting('file_private_path', $site_path . '/private');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.