You are here

protected function ConfigSnapshotTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config/src/Tests/ConfigSnapshotTest.php \Drupal\config\Tests\ConfigSnapshotTest::setUp()

Performs setup tasks before each individual test method is run.

Overrides KernelTestBase::setUp

File

core/modules/config/src/Tests/ConfigSnapshotTest.php, line 30
Contains \Drupal\config\Tests\ConfigSnapshotTest.

Class

ConfigSnapshotTest
Tests config snapshot creation and updating.

Namespace

Drupal\config\Tests

Code

protected function setUp() {
  parent::setUp();

  // 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'));
}