File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/Symfony/Component/Routing/Tests Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 66$ collection ->add ('blog_show ' , new Route (
77 '/blog/{slug} ' ,
88 array ('_controller ' => 'MyBlogBundle:Blog:show ' ),
9- array (),
10- array ('compiler_class ' => 'RouteCompiler ' )
9+ array ('_method ' => 'GET ' ),
10+ array ('compiler_class ' => 'RouteCompiler ' ),
11+ '{locale}.example.com '
1112));
1213
1314return $ collection ;
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ public function testLoadWithRoute()
4747 $ this ->assertEquals (1 , count ($ routes ), 'One route is loaded ' );
4848 $ this ->assertContainsOnly ('Symfony\Component\Routing\Route ' , $ routes );
4949 $ route = $ routes ['blog_show ' ];
50+ $ this ->assertEquals ('/blog/{slug} ' , $ route ->getPattern ());
51+ $ this ->assertEquals ('MyBlogBundle:Blog:show ' , $ route ->getDefault ('_controller ' ));
52+ $ this ->assertEquals ('GET ' , $ route ->getRequirement ('_method ' ));
53+ $ this ->assertEquals ('{locale}.example.com ' , $ route ->getHostnamePattern ());
5054 $ this ->assertEquals ('RouteCompiler ' , $ route ->getOption ('compiler_class ' ));
5155 }
5256}
You can’t perform that action at this time.
0 commit comments