mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding a test case for route params with hyphens. Refs #974
This commit is contained in:
parent
373bebb128
commit
5efddf9a41
1 changed files with 14 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue