function FileStorageTest::setUp
Same name in this branch
- 11.x core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php \Drupal\Tests\Component\PhpStorage\FileStorageTest::setUp()
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::setUp()
- 9 core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php \Drupal\Tests\Component\PhpStorage\FileStorageTest::setUp()
- 8.9.x core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::setUp()
- 8.9.x core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php \Drupal\Tests\Component\PhpStorage\FileStorageTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::setUp()
- 10 core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php \Drupal\Tests\Component\PhpStorage\FileStorageTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ Storage/ FileStorageTest.php, line 29
Class
- FileStorageTest
- Tests FileStorage operations.
Namespace
Drupal\KernelTests\Core\Config\StorageCode
protected function setUp() : void {
parent::setUp();
// Create a directory.
$this->directory = PublicStream::basePath() . '/config';
$this->storage = new FileStorage($this->directory);
$this->invalidStorage = new FileStorage($this->directory . '/nonexisting');
// FileStorage::listAll() requires other configuration data to exist.
$this->storage
->write('system.performance', $this->config('system.performance')
->get());
$this->storage
->write('core.extension', [
'module' => [],
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.