public function RenderCachePlaceholderTest::test_postRenderCacheCallback in Render cache 7.2
@depends test_getPlaceholder @covers ::postRenderCacheCallback() @covers ::loadPlaceholderFunctionArgs()
File
- tests/
src/ Cache/ RenderCachePlaceholderTest.php, line 123 - 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($render) {
$func = $this->placeholderArgLoad;
$foo = call_user_func($func, 'foo');
$this
->processPostRenderCache($render);
$this
->assertEquals($foo, static::$foo, 'Foo was loaded succesfully.');
$expected = $this->data['single']['placeholder'];
$expected['#markup'] = $this->data['single']['return'];
$this
->assertEquals($expected, $render, 'Placeholder was replaced.');
}