Permalink
Browse files

[Routing] added tests

  • Loading branch information...
arnaud-lb committed May 6, 2012
1 parent 79d9e81 commit d1b63dcacd25c1c77a072da842858c604fda848d
@@ -64,6 +64,14 @@ RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz6,E=_ROUTING_default_foo:bar\
RewriteCond %{REQUEST_URI} ^/te\ st/baz$
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz7]
+# baz8
+RewriteCond %{REQUEST_URI} ^/te\\\ st/baz$
+RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz8]
+
+# baz9
+RewriteCond %{REQUEST_URI} ^/test/(te\\\ st)$
+RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz9,E=_ROUTING_param_baz:%1]
+
# 405 Method Not Allowed
RewriteCond %{ENV:_ROUTING_allow_GET} =1 [OR]
RewriteCond %{ENV:_ROUTING_allow_HEAD} =1 [OR]
@@ -98,6 +98,18 @@ private function getRouteCollection()
$collection->add('baz7', new Route(
'/te st/baz'
));
+ // space preceded with \ in path
+ $collection->add('baz8', new Route(
+ '/te\\ st/baz'
+ ));
+ // space preceded with \ in requirement
+ $collection->add('baz9', new Route(
+ '/test/{baz}',
+ array(),
+ array(
+ 'baz' => 'te\\\\ st',
+ )
+ ));
return $collection;
}

0 comments on commit d1b63dc

Please sign in to comment.