You are here

protected function ConfigSnapshotStorageTest::read in Config Snapshot 8

Overrides ConfigStorageTestBase::read

File

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

Class

ConfigSnapshotStorageTest
Tests ConfigSnapshotStorage operations.

Namespace

Drupal\Tests\config_snapshot\Kernel

Code

protected function read($name) {

  /* @var \Drupal\config_snapshot\Entity\ConfigSnapshot $config_snapshot */
  $config_snapshot = ConfigSnapshot::load('example.module.example_module');
  if ($item = $config_snapshot
    ->getItem($this->storage
    ->getCollectionName(), $name)) {
    return $item['data'];
  }
  return FALSE;
}