MemoryBackendTest.php 559 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Drupal\KernelTests\Core\Cache;
  3. use Drupal\Core\Cache\MemoryBackend;
  4. /**
  5. * Unit test of the memory cache backend using the generic cache unit test base.
  6. *
  7. * @group Cache
  8. */
  9. class MemoryBackendTest extends GenericCacheBackendUnitTestBase {
  10. /**
  11. * Creates a new instance of MemoryBackend.
  12. *
  13. * @return
  14. * A new MemoryBackend object.
  15. */
  16. protected function createCacheBackend($bin) {
  17. $backend = new MemoryBackend();
  18. \Drupal::service('cache_tags.invalidator')->addInvalidator($backend);
  19. return $backend;
  20. }
  21. }