class FolderTest

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

Tests BrowserTestBase's treatment of hook_install() during setup.

Image module is used for test.

@group browsertestbase

Hierarchy

Expanded class hierarchy of FolderTest

File

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

Namespace

Drupal\FunctionalTests
View source
class FolderTest extends BrowserTestBase {
  
  /**
   * Modules to enable.
   *
   * @var array
   */
  protected static $modules = [
    'image',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  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.