protected function FileTestBase::setUpFilesystem in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/File/FileTestBase.php \Drupal\KernelTests\Core\File\FileTestBase::setUpFilesystem()
Sets up the filesystem, so things like the file directory.
Overrides KernelTestBase::setUpFilesystem
File
- core/
tests/ Drupal/ KernelTests/ Core/ File/ FileTestBase.php, line 66
Class
- FileTestBase
- Base class for file tests that adds some additional file specific assertions and helper functions.
Namespace
Drupal\KernelTests\Core\FileCode
protected function setUpFilesystem() {
$public_file_directory = $this->siteDirectory . '/files';
require_once 'core/includes/file.inc';
mkdir($this->siteDirectory, 0775);
mkdir($this->siteDirectory . '/files', 0775);
mkdir($this->siteDirectory . '/files/config/sync', 0775, TRUE);
$this
->setSetting('file_public_path', $public_file_directory);
$this
->setSetting('config_sync_directory', $this->siteDirectory . '/files/config/sync');
}