function ScanDirectoryTest::setUp

Same name and namespace 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 37

Class

ScanDirectoryTest
Tests <a href="/api/drupal/core%21lib%21Drupal%21Core%21File%21FileSystem.php/class/FileSystem/11.x" title="Provides helpers to operate on files and stream wrappers." class="local">\Drupal\Core\File\FileSystem</a>::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.