protected function KernelTestBase::setUpFilesystem in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUpFilesystem()
 - 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUpFilesystem()
 
Sets up the filesystem, so things like the file directory.
1 call to KernelTestBase::setUpFilesystem()
- KernelTestBase::bootEnvironment in core/
tests/ Drupal/ KernelTests/ KernelTestBase.php  - Bootstraps a basic test environment.
 
1 method overrides KernelTestBase::setUpFilesystem()
- FileTestBase::setUpFilesystem in core/
tests/ Drupal/ KernelTests/ Core/ File/ FileTestBase.php  - Sets up the filesystem, so things like the file directory.
 
File
- core/
tests/ Drupal/ KernelTests/ KernelTestBase.php, line 299  
Class
- KernelTestBase
 - Base class for functional integration tests.
 
Namespace
Drupal\KernelTestsCode
protected function setUpFilesystem() {
  $test_db = new TestDatabase($this->databasePrefix);
  $test_site_path = $test_db
    ->getTestSitePath();
  $this->vfsRoot = vfsStream::setup('root');
  $this->vfsRoot
    ->addChild(vfsStream::newDirectory($test_site_path));
  $this->siteDirectory = vfsStream::url('root/' . $test_site_path);
  mkdir($this->siteDirectory . '/files', 0775);
  mkdir($this->siteDirectory . '/files/config/sync', 0775, TRUE);
  $settings = Settings::getInstance() ? Settings::getAll() : [];
  $settings['file_public_path'] = $this->siteDirectory . '/files';
  $settings['config_sync_directory'] = $this->siteDirectory . '/files/config/sync';
  new Settings($settings);
}