You are here

public function ManagedStorageTest::getStorage in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php \Drupal\KernelTests\Core\Config\Storage\ManagedStorageTest::getStorage()

Get the config storage.

Return value

\Drupal\Core\Config\StorageInterface The config storage.

Throws

\Drupal\Core\Config\StorageTransformerException Thrown when the lock could not be acquired.

Overrides StorageManagerInterface::getStorage

File

core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php, line 19

Class

ManagedStorageTest
Tests ManagedStorage operations.

Namespace

Drupal\KernelTests\Core\Config\Storage

Code

public function getStorage() {

  // We return a new storage every time to make sure the managed storage
  // only calls this once and retains the configuration by itself.
  return new MemoryStorage();
}