function CachedStorageTest::setUp
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php \Drupal\KernelTests\Core\Config\Storage\CachedStorageTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php \Drupal\KernelTests\Core\Config\Storage\CachedStorageTest::setUp()
- 11.x core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php \Drupal\KernelTests\Core\Config\Storage\CachedStorageTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ Storage/ CachedStorageTest.php, line 32
Class
- CachedStorageTest
- Tests CachedStorage operations.
Namespace
Drupal\KernelTests\Core\Config\StorageCode
protected function setUp() {
parent::setUp();
// Create a directory.
$dir = PublicStream::basePath() . '/config';
$this->fileStorage = new FileStorage($dir);
$this->storage = new CachedStorage($this->fileStorage, \Drupal::service('cache.config'));
$this->cache = \Drupal::service('cache_factory')->get('config');
// ::listAll() verifications require other configuration data to exist.
$this->storage
->write('system.performance', []);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.