function ScanDirectoryTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php \Drupal\KernelTests\Core\File\ScanDirectoryTest::setUp()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php \Drupal\KernelTests\Core\File\ScanDirectoryTest::setUp()
  3. 10 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');
}

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