function CachedStorageTest::read

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php \Drupal\KernelTests\Core\Config\Storage\CachedStorageTest::read()
  2. 10 core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php \Drupal\KernelTests\Core\Config\Storage\CachedStorageTest::read()
  3. 11.x core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php \Drupal\KernelTests\Core\Config\Storage\CachedStorageTest::read()

Overrides ConfigStorageTestBase::read

File

core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php, line 54

Class

CachedStorageTest
Tests CachedStorage operations.

Namespace

Drupal\KernelTests\Core\Config\Storage

Code

protected function read($name) {
    $data = $this->cache
        ->get($name);
    // Cache misses fall through to the underlying storage.
    return $data ? $data->data : $this->fileStorage
        ->read($name);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.