You are here

MemoryBackendUnitTest.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/system/src/Tests/Cache/MemoryBackendUnitTest.php

File

core/modules/system/src/Tests/Cache/MemoryBackendUnitTest.php
View source
<?php

/**
 * @file
 * Contains \Drupal\system\Tests\Cache\MemoryBackendUnitTest.
 */
namespace Drupal\system\Tests\Cache;

use Drupal\Core\Cache\MemoryBackend;

/**
 * Unit test of the memory cache backend using the generic cache unit test base.
 *
 * @group Cache
 */
class MemoryBackendUnitTest extends GenericCacheBackendUnitTestBase {

  /**
   * Creates a new instance of MemoryBackend.
   *
   * @return
   *   A new MemoryBackend object.
   */
  protected function createCacheBackend($bin) {
    $backend = new MemoryBackend($bin);
    \Drupal::service('cache_tags.invalidator')
      ->addInvalidator($backend);
    return $backend;
  }

}

Classes

Namesort descending Description
MemoryBackendUnitTest Unit test of the memory cache backend using the generic cache unit test base.