Adding a test case for route params with hyphens. Refs #974

This commit is contained in:
mark_story 2010-07-31 11:23:02 -04:00
parent 373bebb128
commit 5efddf9a41

View file

@ -2401,6 +2401,19 @@ class CakeRouteTestCase extends CakeTestCase {
$result = $route->match($url);
$expected = '/admin/subscriptions/edit/1';
$this->assertEqual($result, $expected);
$route =& new CakeRoute('/articles/:date-from/:date-to', array(
'controller' => 'articles', 'action' => 'index'
));
$url = array(
'controller' => 'articles',
'action' => 'index',
'date-from' => '2009-07-31',
'date-to' => '2010-07-31'
);
$result = $route->match($url);
$expected = '/articles/2009-07-31/2010-07-31';
$this->assertEqual($result, $expected);
}
/**