File tree 2 files changed +7
-2
lines changed
src/Symfony/Component/Routing/Tests 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
$ collection ->add ('blog_show ' , new Route (
7
7
'/blog/{slug} ' ,
8
8
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 '
11
12
));
12
13
13
14
return $ collection ;
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ public function testLoadWithRoute()
47
47
$ this ->assertEquals (1 , count ($ routes ), 'One route is loaded ' );
48
48
$ this ->assertContainsOnly ('Symfony\Component\Routing\Route ' , $ routes );
49
49
$ 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 ());
50
54
$ this ->assertEquals ('RouteCompiler ' , $ route ->getOption ('compiler_class ' ));
51
55
}
52
56
}
You can’t perform that action at this time.
0 commit comments