@@ -46,14 +46,18 @@ public function testRulesAreAddedWhenFormatListenerAndProfilerToolbarAreEnabled(
4646 'path ' => '^/ ' ,
4747 'priorities ' => array ('html ' , 'json ' ),
4848 'fallback_format ' => 'html ' ,
49+ 'exception_fallback_format ' => 'html ' ,
4950 'prefer_extension ' => true ,
5051 ),
5152 ) )
5253 );
5354
54- $ container ->expects ($ this ->exactly (2 ))
55+ $ container ->expects ($ this ->exactly (4 ))
5556 ->method ('getDefinition ' )
56- ->with ('fos_rest.format_negotiator ' )
57+ ->with ($ this ->logicalOr (
58+ $ this ->equalTo ('fos_rest.format_negotiator ' ),
59+ $ this ->equalTo ('fos_rest.exception_format_negotiator ' )
60+ ))
5761 ->will ($ this ->returnValue ($ definition ));
5862
5963 $ compiler = new FormatListenerRulesPass ();
@@ -88,14 +92,18 @@ public function testNoRulesAreAddedWhenProfilerToolbarAreDisabled()
8892 'path ' => '^/ ' ,
8993 'priorities ' => array ('html ' , 'json ' ),
9094 'fallback_format ' => 'html ' ,
95+ 'exception_fallback_format ' => 'html ' ,
9196 'prefer_extension ' => true ,
9297 ),
9398 ) )
9499 );
95100
96- $ container ->expects ($ this ->exactly (1 ))
101+ $ container ->expects ($ this ->exactly (2 ))
97102 ->method ('getDefinition ' )
98- ->with ('fos_rest.format_negotiator ' )
103+ ->with ($ this ->logicalOr (
104+ $ this ->equalTo ('fos_rest.format_negotiator ' ),
105+ $ this ->equalTo ('fos_rest.exception_format_negotiator ' )
106+ ))
99107 ->will ($ this ->returnValue ($ definition ));
100108
101109 $ compiler = new FormatListenerRulesPass ();
0 commit comments