FolderTest.php 638 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Drupal\FunctionalTests;
  3. use Drupal\Tests\BrowserTestBase;
  4. /**
  5. * This test will check BrowserTestBase's treatment of hook_install during
  6. * setUp.
  7. * Image module is used for test.
  8. *
  9. * @group browsertestbase
  10. */
  11. class FolderTest extends BrowserTestBase {
  12. /**
  13. * Modules to enable.
  14. *
  15. * @var array
  16. */
  17. public static $modules = ['image'];
  18. /**
  19. * {@inheritdoc}
  20. */
  21. protected $defaultTheme = 'stark';
  22. public function testFolderSetup() {
  23. $directory = 'public://styles';
  24. $this->assertTrue(\Drupal::service('file_system')->prepareDirectory($directory, FALSE), 'Directory created.');
  25. }
  26. }