public function testRenderWithAttributesOptions() {
// with id
$strategy = new HIncludeFragmentRenderer();
$this
->assertEquals('<hx:include src="/foo" id="bar">default</hx:include>', $strategy
->render('/foo', Request::create('/'), array(
'default' => 'default',
'id' => 'bar',
))
->getContent());
// with attributes
$strategy = new HIncludeFragmentRenderer();
$this
->assertEquals('<hx:include src="/foo" p1="v1" p2="v2">default</hx:include>', $strategy
->render('/foo', Request::create('/'), array(
'default' => 'default',
'attributes' => array(
'p1' => 'v1',
'p2' => 'v2',
),
))
->getContent());
// with id & attributes
$strategy = new HIncludeFragmentRenderer();
$this
->assertEquals('<hx:include src="/foo" p1="v1" p2="v2" id="bar">default</hx:include>', $strategy
->render('/foo', Request::create('/'), array(
'default' => 'default',
'id' => 'bar',
'attributes' => array(
'p1' => 'v1',
'p2' => 'v2',
),
))
->getContent());
}