You are here

protected function UpdateModeTest::verifySnapshot in Configuration Synchronizer 8.2

3 calls to UpdateModeTest::verifySnapshot()
UpdateModeTest::testUpdateModeFullReset in tests/src/Kernel/UpdateModeTest.php
UpdateModeTest::testUpdateModeMerge in tests/src/Kernel/UpdateModeTest.php
UpdateModeTest::testUpdateModePartialReset in tests/src/Kernel/UpdateModeTest.php

File

tests/src/Kernel/UpdateModeTest.php, line 281

Class

UpdateModeTest
Tests importing configuration entities using various import modes.

Namespace

Drupal\Tests\config_sync\Kernel

Code

protected function verifySnapshot() {

  // Verify that all provided items are now snapshotted.
  $expected_snapshot_items = array_values($this->configNames);
  $test_snapshot_storage = $this
    ->getConfigSnapshotStorage(ConfigSyncSnapshotterInterface::CONFIG_SNAPSHOT_SET, 'module', 'config_sync_test');
  $snapshot_items = $test_snapshot_storage
    ->listAll();
  $this
    ->assertSame($snapshot_items, $expected_snapshot_items, 'Snapshot items match those expected.');

  // Verify that the snapshot is now fully updated.
  $extension_storage = $this->container
    ->get('config_update.extension_storage');
  foreach (array_keys($this->configNames) as $index) {
    $this
      ->assertEquals($extension_storage
      ->read($this->configNames[$index]), $test_snapshot_storage
      ->read($this->configNames[$index]));
  }
}