public function HIncludeFragmentRendererTest::testRenderWithDefault in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php \Symfony\Component\HttpKernel\Tests\Fragment\HIncludeFragmentRendererTest::testRenderWithDefault()
File
- vendor/
symfony/ http-kernel/ Tests/ Fragment/ HIncludeFragmentRendererTest.php, line 46
Class
Namespace
Symfony\Component\HttpKernel\Tests\FragmentCode
public function testRenderWithDefault() {
// only default
$strategy = new HIncludeFragmentRenderer();
$this
->assertEquals('<hx:include src="/foo">default</hx:include>', $strategy
->render('/foo', Request::create('/'), array(
'default' => 'default',
))
->getContent());
// only global default
$strategy = new HIncludeFragmentRenderer(null, null, 'global_default');
$this
->assertEquals('<hx:include src="/foo">global_default</hx:include>', $strategy
->render('/foo', Request::create('/'), array())
->getContent());
// global default and default
$strategy = new HIncludeFragmentRenderer(null, null, 'global_default');
$this
->assertEquals('<hx:include src="/foo">default</hx:include>', $strategy
->render('/foo', Request::create('/'), array(
'default' => 'default',
))
->getContent());
}