class FolderTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/FolderTest.php \Drupal\FunctionalTests\FolderTest
- 10 core/tests/Drupal/FunctionalTests/FolderTest.php \Drupal\FunctionalTests\FolderTest
- 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
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\FolderTest extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of FolderTest
File
-
core/
tests/ Drupal/ FunctionalTests/ FolderTest.php, line 14
Namespace
Drupal\FunctionalTestsView 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.