public function EsiFragmentRendererTest::testRender in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php \Symfony\Component\HttpKernel\Tests\Fragment\EsiFragmentRendererTest::testRender()
File
- vendor/
symfony/ http-kernel/ Tests/ Fragment/ EsiFragmentRendererTest.php, line 34
Class
Namespace
Symfony\Component\HttpKernel\Tests\FragmentCode
public function testRender() {
$strategy = new EsiFragmentRenderer(new Esi(), $this
->getInlineStrategy());
$request = Request::create('/');
$request
->setLocale('fr');
$request->headers
->set('Surrogate-Capability', 'ESI/1.0');
$this
->assertEquals('<esi:include src="/" />', $strategy
->render('/', $request)
->getContent());
$this
->assertEquals("<esi:comment text=\"This is a comment\" />\n<esi:include src=\"/\" />", $strategy
->render('/', $request, array(
'comment' => 'This is a comment',
))
->getContent());
$this
->assertEquals('<esi:include src="/" alt="foo" />', $strategy
->render('/', $request, array(
'alt' => 'foo',
))
->getContent());
}