function FolderTest::testFolderSetup

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/FolderTest.php \Drupal\FunctionalTests\FolderTest::testFolderSetup()
  2. 10 core/tests/Drupal/FunctionalTests/FolderTest.php \Drupal\FunctionalTests\FolderTest::testFolderSetup()
  3. 11.x core/tests/Drupal/FunctionalTests/FolderTest.php \Drupal\FunctionalTests\FolderTest::testFolderSetup()

File

core/tests/Drupal/FunctionalTests/FolderTest.php, line 28

Class

FolderTest
Tests BrowserTestBase&#039;s treatment of <a href="/api/drupal/core%21lib%21Drupal%21Core%21Extension%21module.api.php/function/hook_install/9" title="Perform setup tasks when the module is installed." class="local">hook_install</a>() during setup.

Namespace

Drupal\FunctionalTests

Code

public function testFolderSetup() {
    $directory = 'public://styles';
    $this->assertTrue(\Drupal::service('file_system')->prepareDirectory($directory, FALSE), 'Directory created.');
}

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