You are here

protected function ScanDirectoryTest::setUp in Drupal 9

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

Overrides FileTestBase::setUp

1 call to ScanDirectoryTest::setUp()
RemoteFileScanDirectoryTest::setUp in core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php
1 method overrides ScanDirectoryTest::setUp()
RemoteFileScanDirectoryTest::setUp in core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php

File

core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php, line 35

Class

ScanDirectoryTest
Tests \Drupal\Core\File\FileSystem::scanDirectory.

Namespace

Drupal\KernelTests\Core\File

Code

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

  // Hardcode the location of the fixtures files as it is already known
  // and shouldn't change, and we don't yet have a way to retrieve their
  // location from \Drupal\Core\Extension\ExtensionList::getPathname() in a
  // cached way.
  // @todo Remove as part of https://www.drupal.org/node/2186491
  $this->path = 'core/tests/fixtures/files';
  $this->fileSystem = $this->container
    ->get('file_system');
}