public function RenderStackTest::test_processPostRenderCache_lateStrategy in Render cache 7.2
@covers ::processPostRenderCache()
File
- tests/
src/ Cache/ RenderStackTest.php, line 659 - Contains \Drupal\render_cache\Tests\Cache\RenderStackTest
Class
- RenderStackTest
- @coversDefaultClass \Drupal\render_cache\Cache\RenderStack @group cache
Namespace
Drupal\render_cache\Tests\CacheCode
public function test_processPostRenderCache_lateStrategy() {
$cache_info = array(
'render_cache_cache_strategy' => \RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER,
);
$render = array(
'#markup' => 'bar',
'#cache' => array(
'tags' => array(
'node:1',
),
),
'#attached' => array(
'library' => array(
array(
'contextual',
'contextual-links',
),
),
),
);
$render['#post_render_cache'] = array(
'\\Drupal\\render_cache\\Tests\\Cache\\RenderStackTest::renderStackPostProcessTest' => array(
array(
'bar',
'baz',
array(
'baz',
'foo',
FALSE,
$this->renderStack,
),
$this->renderStack,
),
),
);
$result = $render;
$this->renderStack
->processPostRenderCache($render, $cache_info);
$this
->assertEquals($result, $render, 'Render matches when using post_render_cache with late render strategy.');
}