$sync =
$this->container->
get('config.storage.sync'
);
$snapshot =
$this->container->
get('config.storage.snapshot'
);
$config_name = 'config_test.system';
$config_key = 'foo';
$new_data = 'foobar';
$active_snapshot_comparer =
new StorageComparer($active,
$snapshot);
$sync_snapshot_comparer =
new StorageComparer($sync,
$snapshot);
// Verify that we have an initial snapshot that matches the active
// configuration. This has to be true as no config should be installed.
$this->
assertFalse($active_snapshot_comparer->
createChangelist()->
hasChanges());
// Install the default config.
$this->
installConfig(['config_test'
]);
// Although we have imported config this has not affected the snapshot.
$this->
assertTrue($active_snapshot_comparer->
reset()->
hasChanges());
// Update the config snapshot.
\Drupal::
service('config.manager'
)->
createSnapshot($active,
$snapshot);
// The snapshot and active config should now contain the same config
// objects.