You are here

public function DatabaseStorageExpirableTest::register in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php \Drupal\KernelTests\Core\KeyValueStore\DatabaseStorageExpirableTest::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

See also

\Drupal\Tests\KernelTestBase::bootKernel()

File

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

Class

DatabaseStorageExpirableTest
Tests the key-value database storage.

Namespace

Drupal\KernelTests\Core\KeyValueStore

Code

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