You are here

MemcacheBackendTest.php in Memcache API and Integration 8.2

File

tests/src/Kernel/MemcacheBackendTest.php
View 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

Namesort descending Description
MemcacheBackendTest Tests the MemcacheBackend.