MemoryStorageTest.php

Same filename in this branch
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php
Same filename in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php
  2. 9 core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php
  3. 10 core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php
  4. 10 core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php
  5. 11.x core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php
  6. 11.x core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php

Namespace

Drupal\KernelTests\Core\KeyValueStore

File

core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php

View source
<?php

namespace Drupal\KernelTests\Core\KeyValueStore;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\KeyValueStore\KeyValueFactory;

/**
 * Tests the key-value memory storage.
 *
 * @group KeyValueStore
 */
class MemoryStorageTest extends StorageTestBase {
    
    /**
     * {@inheritdoc}
     */
    public function register(ContainerBuilder $container) {
        parent::register($container);
        $container->register('keyvalue.memory', 'Drupal\\Core\\KeyValueStore\\KeyValueMemoryFactory');
        $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.memory';
        $container->setParameter('factory.keyvalue', $parameter);
    }

}

Classes

Title Deprecated Summary
MemoryStorageTest Tests the key-value memory storage.

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