MemcacheBackendTest.php in Memcache API and Integration 8.2
Namespace
Drupal\Tests\memcache\KernelFile
tests/src/Kernel/MemcacheBackendTest.phpView source
<?php
namespace Drupal\Tests\memcache\Kernel;
use Drupal\KernelTests\Core\Cache\GenericCacheBackendUnitTestBase;
use Drupal\memcache\MemcacheBackendFactory;
/**
* Tests the MemcacheBackend.
*
* @group memcache
*/
class MemcacheBackendTest extends GenericCacheBackendUnitTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = [
'system',
'memcache',
];
/**
* Creates a new instance of DatabaseBackend.
*
* @return \Drupal\memcache\MemcacheBackend
* A new MemcacheBackend object.
*/
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);
}
}
Classes
Name | Description |
---|---|
MemcacheBackendTest | Tests the MemcacheBackend. |