You are here

protected function DatabaseBackendTest::createCacheBackend in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php \Drupal\KernelTests\Core\Cache\DatabaseBackendTest::createCacheBackend()
  2. 9 core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php \Drupal\KernelTests\Core\Cache\DatabaseBackendTest::createCacheBackend()

Creates a new instance of DatabaseBackend.

Return value

A new DatabaseBackend object.

Overrides GenericCacheBackendUnitTestBase::createCacheBackend

File

core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php, line 34

Class

DatabaseBackendTest
Unit test of the database backend using the generic cache unit test base.

Namespace

Drupal\KernelTests\Core\Cache

Code

protected function createCacheBackend($bin) {
  return new DatabaseBackend($this->container
    ->get('database'), $this->container
    ->get('cache_tags.invalidator.checksum'), $bin, static::$maxRows);
}