public function HIncludeFragmentRendererTest::testRenderWithDefaultText 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::testRenderWithDefaultText()
File
- vendor/
symfony/ http-kernel/ Tests/ Fragment/ HIncludeFragmentRendererTest.php, line 76
Class
Namespace
Symfony\Component\HttpKernel\Tests\FragmentCode
public function testRenderWithDefaultText() {
$engine = $this
->getMock('Symfony\\Component\\Templating\\EngineInterface');
$engine
->expects($this
->once())
->method('exists')
->with('default')
->will($this
->throwException(new \InvalidArgumentException()));
// only default
$strategy = new HIncludeFragmentRenderer($engine);
$this
->assertEquals('<hx:include src="/foo">default</hx:include>', $strategy
->render('/foo', Request::create('/'), array(
'default' => 'default',
))
->getContent());
}