protected function MemoryBackendUnitTest::createCacheBackend in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Cache/MemoryBackendUnitTest.php \Drupal\system\Tests\Cache\MemoryBackendUnitTest::createCacheBackend()
Creates a new instance of MemoryBackend.
Return value
A new MemoryBackend object.
Overrides GenericCacheBackendUnitTestBase::createCacheBackend
File
- core/
modules/ system/ src/ Tests/ Cache/ MemoryBackendUnitTest.php, line 25 - Contains \Drupal\system\Tests\Cache\MemoryBackendUnitTest.
Class
- MemoryBackendUnitTest
- Unit test of the memory cache backend using the generic cache unit test base.
Namespace
Drupal\system\Tests\CacheCode
protected function createCacheBackend($bin) {
$backend = new MemoryBackend($bin);
\Drupal::service('cache_tags.invalidator')
->addInvalidator($backend);
return $backend;
}