function DatabaseStorageTest::register

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php \Drupal\KernelTests\Core\KeyValueStore\DatabaseStorageTest::register()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php \Drupal\KernelTests\Core\KeyValueStore\DatabaseStorageTest::register()
  3. 10 core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php \Drupal\KernelTests\Core\KeyValueStore\DatabaseStorageTest::register()

Registers test-specific services.

Extend this method in your test to register additional services. This method is called whenever the kernel is rebuilt.

Parameters

\Drupal\Core\DependencyInjection\ContainerBuilder $container: The service container to enhance.

Overrides KernelTestBase::register

File

core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php, line 30

Class

DatabaseStorageTest
Tests the key-value database storage.

Namespace

Drupal\KernelTests\Core\KeyValueStore

Code

public function register(ContainerBuilder $container) : void {
  parent::register($container);
  $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.database';
  $container->setParameter('factory.keyvalue', $parameter);
}

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