function DbDumpTest::register

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php \Drupal\KernelTests\Core\Command\DbDumpTest::register()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php \Drupal\KernelTests\Core\Command\DbDumpTest::register()
  3. 10 core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php \Drupal\Tests\mysql\Kernel\mysql\DbDumpTest::register()

Register a database cache backend rather than memory-based.

Overrides KernelTestBase::register

File

core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php, line 77

Class

DbDumpTest
Tests for the database dump commands.

Namespace

Drupal\Tests\mysql\Kernel\mysql

Code

public function register(ContainerBuilder $container) : void {
    parent::register($container);
    $container->register('cache_factory', 'Drupal\\Core\\Cache\\DatabaseBackendFactory')
        ->addArgument(new Reference('database'))
        ->addArgument(new Reference('cache_tags.invalidator.checksum'))
        ->addArgument(new Reference('settings'))
        ->addArgument(new Reference('serialization.phpserialize'))
        ->addArgument(new Reference(TimeInterface::class));
}

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