public function RenderCachePlaceholderTest::test_postRenderCacheCallback_noPlaceholder in Render cache 7.2
@depends test_getPlaceholder @covers ::postRenderCacheCallback()
File
- tests/
src/ Cache/ RenderCachePlaceholderTest.php, line 140 - 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_noPlaceholder($render) {
static::$foo = NULL;
$render['#markup'] = 'Bar';
$this
->processPostRenderCache($render);
$this
->assertNull(static::$foo, 'Foo was not loaded.');
$expected = $this->data['single']['placeholder'];
$expected['#markup'] = 'Bar';
$this
->assertEquals($expected, $render, 'Placeholder was not replaced.');
}