protected function FileStorageTest::setUp in Drupal 9
Same name in this branch
- 9 core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php \Drupal\Tests\Component\PhpStorage\FileStorageTest::setUp()
- 9 core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::setUp()
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::setUp()
Overrides KernelTestBase::setUp
File
- core/
tests/ Drupal/ KernelTests/ Core/ Config/ Storage/ FileStorageTest.php, line 27
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' => [],
]);
}