FolderTest.php

Same filename and directory in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/FolderTest.php
  2. 10 core/tests/Drupal/FunctionalTests/FolderTest.php
  3. 9 core/tests/Drupal/FunctionalTests/FolderTest.php
  4. 8.9.x core/tests/Drupal/FunctionalTests/FolderTest.php

Namespace

Drupal\FunctionalTests

File

core/tests/Drupal/FunctionalTests/FolderTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\FunctionalTests;

use Drupal\Tests\BrowserTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Tests BrowserTestBase's treatment of hook_install() during setup.
 *
 * Image module is used for test.
 */
class FolderTest extends BrowserTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'image',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  public function testFolderSetup() : void {
    $directory = 'public://styles';
    $this->assertTrue(\Drupal::service('file_system')->prepareDirectory($directory, FALSE), 'Directory created.');
  }

}

Classes

Title Deprecated Summary
FolderTest Tests BrowserTestBase's treatment of hook_install() during setup.

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