function RendererTestBase::setUpMemoryCache
Sets up a memory-based render cache back-end.
15 calls to RendererTestBase::setUpMemoryCache()
- RendererBubblingTest::testBubblingWithoutPreRender in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php  - Tests bubbling of assets when NOT using #pre_render callbacks.
 - RendererBubblingTest::testBubblingWithPrerender in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php  - Tests bubbling of bubbleable metadata added by #pre_render callbacks.
 - RendererBubblingTest::testConditionalCacheContextBubblingSelfHealing in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php  - Tests the self-healing of the redirect with conditional cache contexts.
 - RendererBubblingTest::testContextBubblingEdgeCases in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php  - Tests cache context bubbling in edge cases, because it affects the CID.
 - RendererBubblingTest::testOverWriteCacheKeys in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php  - Tests that an element's cache keys cannot be changed during its rendering.
 
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTestBase.php, line 235  
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 VariationCache($this->requestStack, new MemoryBackend(new Time($this->requestStack)), $this->cacheContextsManager);
  $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.