More Router tests

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5526 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-08-15 14:38:28 +00:00
parent 8dbd6366c1
commit 3b0099b877

View file

@ -213,12 +213,16 @@ class RouterTest extends UnitTestCase {
'webservices' => null
)
));
$this->router->connect('short_controller_name/index/*', array('controller' => 'real_controller_name'));
$this->router->connect('short_controller_name/:action/*', array('controller' => 'real_controller_name'));
$result = $this->router->url(array('controller' => 'real_controller_name', 'page' => '1'));
$expected = '/short_controller_name/index/page:1';
$this->assertEqual($result, $expected);
$result = $this->router->url(array('action' => 'add'));
$expected = '/short_controller_name/add/';
$this->assertEqual($result, $expected);
$this->router->reload();
$this->router->connect(