public function RenderCachePlaceholderTest::test_postRenderCacheCallback_wrongFunction in Render cache 7.2
@depends test_getPlaceholder @covers ::postRenderCacheMultiCallback()
File
- tests/
src/ Cache/ RenderCachePlaceholderTest.php, line 154 - Contains \Drupal\render_cache\Tests\Cache\RenderCachePlaceholderTest
Class
- RenderCachePlaceholderTest
- @coversDefaultClass \Drupal\render_cache\Cache\RenderCachePlaceholder @group cache
Namespace
Drupal\render_cache\Tests\CacheCode
public function test_postRenderCacheCallback_wrongFunction($render) {
// Move the callback from the single callback to the multi callback.
$tmp = $render['#post_render_cache'][$this->staticClass . '::postRenderCacheCallback'];
$render['#post_render_cache'][$this->staticClass . '::postRenderCacheMultiCallback'] = $tmp;
unset($render['#post_render_cache'][$this->staticClass . '::postRenderCacheCallback']);
$expected = $render;
$this
->processPostRenderCache($render);
$this
->assertEquals($expected, $render, 'Expected still matches $render.');
}