You are here

protected function ConfigSnapshotStorageTest::update in Config Snapshot 8

Overrides ConfigStorageTestBase::update

File

tests/src/Kernel/ConfigSnapshotStorageTest.php, line 67

Class

ConfigSnapshotStorageTest
Tests ConfigSnapshotStorage operations.

Namespace

Drupal\Tests\config_snapshot\Kernel

Code

protected function update($name, $data) {

  /* @var \Drupal\config_snapshot\Entity\ConfigSnapshot $config_snapshot */
  $config_snapshot = ConfigSnapshot::load('example.module.example_module');
  $config_snapshot
    ->setItem($this->storage
    ->getCollectionName(), $name, $data)
    ->save();
  return TRUE;
}