You are here

protected function PhpBackendTest::createCacheBackend in Drupal 10

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

Creates a new instance of MemoryBackend.

Return value

A new MemoryBackend object.

Overrides GenericCacheBackendUnitTestBase::createCacheBackend

File

core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php, line 20

Class

PhpBackendTest
Unit test of the PHP cache backend using the generic cache unit test base.

Namespace

Drupal\KernelTests\Core\Cache

Code

protected function createCacheBackend($bin) {
  $backend = new PhpBackend($bin, \Drupal::service('cache_tags.invalidator.checksum'));
  return $backend;
}