function ConfigSnapshotTest::setUp
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php \Drupal\KernelTests\Core\Config\ConfigSnapshotTest::setUp()
- 8.9.x core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php \Drupal\KernelTests\Core\Config\ConfigSnapshotTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php \Drupal\KernelTests\Core\Config\ConfigSnapshotTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ ConfigSnapshotTest.php, line 25
Class
- ConfigSnapshotTest
- Tests config snapshot creation and updating.
Namespace
Drupal\KernelTests\Core\ConfigCode
protected function setUp() : void {
parent::setUp();
$this->installConfig([
'system',
]);
// Update the config snapshot. This allows the parent::setUp() to write
// configuration files.
\Drupal::service('config.manager')->createSnapshot(\Drupal::service('config.storage'), \Drupal::service('config.storage.snapshot'));
$this->copyConfig($this->container
->get('config.storage'), $this->container
->get('config.storage.sync'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.