You are here

protected function FileTestBase::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/File/FileTestBase.php \Drupal\KernelTests\Core\File\FileTestBase::setUp()

Overrides KernelTestBase::setUp

12 calls to FileTestBase::setUp()
DownloadTest::setUp in core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
FileCopyTest::setUp in core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
FileUrlGeneratorTest::setUp in core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php
NameMungingTest::setUp in core/tests/Drupal/KernelTests/Core/File/NameMungingTest.php
RemoteFileDeleteRecursiveTest::setUp in core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteRecursiveTest.php

... See full list

12 methods override FileTestBase::setUp()
DownloadTest::setUp in core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
FileCopyTest::setUp in core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
FileUrlGeneratorTest::setUp in core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php
NameMungingTest::setUp in core/tests/Drupal/KernelTests/Core/File/NameMungingTest.php
RemoteFileDeleteRecursiveTest::setUp in core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteRecursiveTest.php

... See full list

File

core/tests/Drupal/KernelTests/Core/File/FileTestBase.php, line 38

Class

FileTestBase
Base class for file tests that adds some additional file specific assertions and helper functions.

Namespace

Drupal\KernelTests\Core\File

Code

protected function setUp() {
  parent::setUp();

  // \Drupal\KernelTests\KernelTestBase::bootKernel() sets a global override
  // for the default scheme because core relies on it in
  // file_default_scheme(). As we are creating the configuration here remove
  // the global override.
  unset($GLOBALS['config']['system.file']);
  \Drupal::configFactory()
    ->getEditable('system.file')
    ->set('default_scheme', 'public')
    ->save();
}