protected function RendererTestBase::setupMemoryCache in Drupal 9
Same name and namespace in other branches
- 8 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 - Contains \Drupal\Tests\Core\Render\RendererTestBase.
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);
}