function RendererTestBase::setupMemoryCache
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Render/RendererTestBase.php \Drupal\Tests\Core\Render\RendererTestBase::setUpMemoryCache()
Sets up a memory-based render cache back-end.
File
-
core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTestBase.php, line 217
Class
- RendererTestBase
- Base class for the actual unit tests testing \Drupal\Core\Render\Renderer.
Namespace
Drupal\Tests\Core\RenderCode
protected function setupMemoryCache() {
$this->memoryCache = $this->memoryCache ?: new MemoryBackend();
$this->cacheFactory
->expects($this->atLeastOnce())
->method('get')
->with('render')
->willReturn($this->memoryCache);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.