File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
tests/lib/MVC/Symfony/Templating Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,27 @@ public function testMultipleFragmentRenderers(): void
9393 );
9494 }
9595
96+ public function testDuplicatedFragmentRenderers (): void
97+ {
98+ $ renderContentStrategy = $ this ->createRenderStrategy (
99+ RenderContentStrategy::class,
100+ [
101+ $ this ->createFragmentRenderer ('method_a ' , 'decorator service used ' ),
102+ $ this ->createFragmentRenderer ('method_a ' , 'original service used ' ),
103+ ],
104+ );
105+
106+ $ contentMock = $ this ->createMock (Content::class);
107+ self ::assertTrue ($ renderContentStrategy ->supports ($ contentMock ));
108+
109+ self ::assertSame (
110+ 'decorator service used ' ,
111+ $ renderContentStrategy ->render ($ contentMock , new RenderOptions ([
112+ 'method ' => 'method_a ' ,
113+ ]))
114+ );
115+ }
116+
96117 public function testExpectedMethodRenderArgumentsFormat (): void
97118 {
98119 $ request = new Request ();
You can’t perform that action at this time.
0 commit comments