function DatabaseBackendTagTest::register
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php \Drupal\KernelTests\Core\Cache\DatabaseBackendTagTest::register()
- 8.9.x core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php \Drupal\KernelTests\Core\Cache\DatabaseBackendTagTest::register()
- 11.x core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php \Drupal\KernelTests\Core\Cache\DatabaseBackendTagTest::register()
Overrides KernelTestBase::register
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Cache/ DatabaseBackendTagTest.php, line 28
Class
- DatabaseBackendTagTest
- Tests DatabaseBackend cache tag implementation.
Namespace
Drupal\KernelTests\Core\CacheCode
public function register(ContainerBuilder $container) {
parent::register($container);
// Change container to database cache backends.
$container->register('cache_factory', 'Drupal\\Core\\Cache\\CacheFactory')
->addArgument(new Reference('settings'))
->addMethodCall('setContainer', [
new Reference('service_container'),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.