function 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.