protected function FileTestBase::setUpFilesystem in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/File/FileTestBase.php \Drupal\KernelTests\Core\File\FileTestBase::setUpFilesystem()
- 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';
$private_file_directory = $this->siteDirectory . '/private';
mkdir($this->siteDirectory, 0775);
mkdir($this->siteDirectory . '/files', 0775);
mkdir($this->siteDirectory . '/private', 0775);
mkdir($this->siteDirectory . '/files/config/sync', 0775, TRUE);
$this
->setSetting('file_public_path', $public_file_directory);
$this
->setSetting('file_private_path', $private_file_directory);
$this
->setSetting('config_sync_directory', $this->siteDirectory . '/files/config/sync');
}