You are here

protected function DatabaseStorageTest::read in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php \Drupal\KernelTests\Core\Config\Storage\DatabaseStorageTest::read()

Overrides ConfigStorageTestBase::read

File

core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php, line 28

Class

DatabaseStorageTest
Tests DatabaseStorage operations.

Namespace

Drupal\KernelTests\Core\Config\Storage

Code

protected function read($name) {
  $data = Database::getConnection()
    ->query('SELECT data FROM {config} WHERE name = :name', [
    ':name' => $name,
  ])
    ->fetchField();
  return unserialize($data);
}