You are here

protected function ApcuBackendUnitTest::createCacheBackend in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php \Drupal\system\Tests\Cache\ApcuBackendUnitTest::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/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php, line 68
Contains \Drupal\system\Tests\Cache\ApcuBackendUnitTest.

Class

ApcuBackendUnitTest
Tests the APCu cache backend.

Namespace

Drupal\system\Tests\Cache

Code

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