DatabaseStorageTest.php

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

Namespace

Drupal\KernelTests\Core\KeyValueStore

File

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

View source
<?php

namespace Drupal\KernelTests\Core\KeyValueStore;

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

/**
 * Tests the key-value database storage.
 *
 * @group KeyValueStore
 */
class DatabaseStorageTest extends StorageTestBase {
    
    /**
     * Modules to enable.
     *
     * @var array
     */
    public static $modules = [
        'system',
    ];
    protected function setUp() {
        parent::setUp();
        $this->installSchema('system', [
            'key_value',
        ]);
    }
    
    /**
     * {@inheritdoc}
     */
    public function register(ContainerBuilder $container) {
        parent::register($container);
        $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.database';
        $container->setParameter('factory.keyvalue', $parameter);
    }

}

Classes

Title Deprecated Summary
DatabaseStorageTest Tests the key-value database storage.

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