You are here

MemoryStorageTest.php in Drupal 9

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

Namesort descending Description
MemoryStorageTest Tests the key-value memory storage.