File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Bundle/TestBundle/Controller Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -20,18 +20,27 @@ public function indexAction()
20
20
{
21
21
$ actions = $ this ->container ->get ('templating ' )->get ('actions ' );
22
22
23
- return new Response ( $ actions ->render ($ actions ->controller ('TestBundle:Fragment:inlined ' , array (
23
+ $ html1 = $ actions ->render ($ actions ->controller ('TestBundle:Fragment:inlined ' , array (
24
24
'options ' => array (
25
25
'bar ' => new Bar (),
26
26
'eleven ' => 11 ,
27
27
),
28
- ))));
28
+ )));
29
+
30
+ $ html2 = $ actions ->render ($ actions ->controller ('TestBundle:Fragment:customformat ' , array ('_format ' => 'html ' )));
31
+
32
+ return new Response ($ html1 .'-- ' .$ html2 );
29
33
}
30
34
31
35
public function inlinedAction ($ options , $ _format )
32
36
{
33
37
return new Response ($ options ['bar ' ]->getBar ().' ' .$ _format );
34
38
}
39
+
40
+ public function customFormatAction ($ _format )
41
+ {
42
+ return new Response ($ _format );
43
+ }
35
44
}
36
45
37
46
class Bar
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function testFragment($insulate)
28
28
29
29
$ client ->request ('GET ' , '/fragment_home ' );
30
30
31
- $ this ->assertEquals ('bar txt ' , $ client ->getResponse ()->getContent ());
31
+ $ this ->assertEquals ('bar txt--html ' , $ client ->getResponse ()->getContent ());
32
32
}
33
33
34
34
public function getConfigs ()
You can’t perform that action at this time.
0 commit comments