function RendererTestBase::setupMemoryCache
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Render/RendererTestBase.php \Drupal\Tests\Core\Render\RendererTestBase::setupMemoryCache()
- 10 core/tests/Drupal/Tests/Core/Render/RendererTestBase.php \Drupal\Tests\Core\Render\RendererTestBase::setUpMemoryCache()
- 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.
11 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 216
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.