File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,33 @@ public function testLoadFormatListenerWithDefaults()
167167 $ this ->assertFalse ($ this ->container ->hasDefinition ('fos_rest.format_listener ' ));
168168 }
169169
170+ public function testLoadFormatListenerWithSingleRule ()
171+ {
172+ $ config = array (
173+ 'fos_rest ' => array ('format_listener ' => array (
174+ 'rules ' => array ('path ' => '/ ' )
175+ )),
176+ );
177+ $ this ->extension ->load ($ config , $ this ->container );
178+
179+ $ this ->assertTrue ($ this ->container ->hasDefinition ('fos_rest.format_listener ' ));
180+ }
181+
182+ public function testLoadFormatListenerWithMultipleRule ()
183+ {
184+ $ config = array (
185+ 'fos_rest ' => array ('format_listener ' => array (
186+ 'rules ' => array (
187+ array ('path ' => '/foo ' ),
188+ array ('path ' => '/ ' )
189+ )
190+ )),
191+ );
192+ $ this ->extension ->load ($ config , $ this ->container );
193+
194+ $ this ->assertTrue ($ this ->container ->hasDefinition ('fos_rest.format_listener ' ));
195+ }
196+
170197 public function testLoadServicesWithDefaults ()
171198 {
172199 $ this ->extension ->load (array (), $ this ->container );
You can’t perform that action at this time.
0 commit comments