class MemoryBackendTest

Same name in this branch
  1. 9 core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest
Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php \Drupal\KernelTests\Core\Cache\MemoryBackendTest
  2. 11.x core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest

Unit test of the memory cache backend using the generic cache unit test base.

@group Cache

Hierarchy

Expanded class hierarchy of MemoryBackendTest

File

core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php, line 12

Namespace

Drupal\KernelTests\Core\Cache
View source
class MemoryBackendTest extends GenericCacheBackendUnitTestBase {
  
  /**
   * Creates a new instance of MemoryBackend.
   *
   * @return \Drupal\Core\Cache\CacheBackendInterface
   *   A new MemoryBackend object.
   */
  protected function createCacheBackend($bin) {
    $backend = new MemoryBackend();
    \Drupal::service('cache_tags.invalidator')->addInvalidator($backend);
    return $backend;
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.