protected function FileStorageTest::setUp in Zircon Profile 8.0
Same name in this branch
- 8.0 core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php \Drupal\Tests\Component\PhpStorage\FileStorageTest::setUp()
- 8.0 core/modules/config/src/Tests/Storage/FileStorageTest.php \Drupal\config\Tests\Storage\FileStorageTest::setUp()
Same name and namespace in other branches
- 8 core/modules/config/src/Tests/Storage/FileStorageTest.php \Drupal\config\Tests\Storage\FileStorageTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides KernelTestBase::setUp
File
- core/
modules/ config/ src/ Tests/ Storage/ FileStorageTest.php, line 30 - Contains \Drupal\config\Tests\Storage\FileStorageTest.
Class
- FileStorageTest
- Tests FileStorage operations.
Namespace
Drupal\config\Tests\StorageCode
protected function setUp() {
parent::setUp();
// Create a directory.
$this->directory = $this->publicFilesDirectory . '/config';
mkdir($this->directory);
$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', array(
'module' => array(),
));
}