You are here

protected function ApcuBackendTest::createCacheBackend in Drupal 9

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

Creates a cache backend to test.

Override this method to test a CacheBackend.

Parameters

string $bin: Bin name to use for this backend instance.

Return value

\Drupal\Core\Cache\CacheBackendInterface Cache backend to test.

Overrides GenericCacheBackendUnitTestBase::createCacheBackend

File

core/tests/Drupal/KernelTests/Core/Cache/ApcuBackendTest.php, line 18

Class

ApcuBackendTest
Tests the APCu cache backend.

Namespace

Drupal\KernelTests\Core\Cache

Code

protected function createCacheBackend($bin) {
  return new ApcuBackend($bin, $this->databasePrefix, \Drupal::service('cache_tags.invalidator.checksum'));
}