You are here

protected function MemcacheBackendTest::createCacheBackend in Memcache API and Integration 8.2

Creates a new instance of DatabaseBackend.

Return value

\Drupal\memcache\MemcacheBackend A new MemcacheBackend object.

Overrides GenericCacheBackendUnitTestBase::createCacheBackend

File

tests/src/Kernel/MemcacheBackendTest.php, line 28

Class

MemcacheBackendTest
Tests the MemcacheBackend.

Namespace

Drupal\Tests\memcache\Kernel

Code

protected function createCacheBackend($bin) {
  $factory = new MemcacheBackendFactory($this->container
    ->get('memcache.factory'), $this->container
    ->get('cache_tags.invalidator.checksum'), $this->container
    ->get('memcache.timestamp.invalidator.bin'));
  return $factory
    ->get($bin);
}