Skip to content

Commit

Permalink
Adding testcase for bug #44
Browse files Browse the repository at this point in the history
  • Loading branch information
farhadi authored and markstory committed Sep 5, 2009
1 parent 4f44111 commit 12457ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cake/tests/cases/libs/router.test.php
Expand Up @@ -693,6 +693,20 @@ function testUrlGeneration() {
));
$expected = '/admin/shows/show_tickets/edit/6';
$this->assertEqual($result, $expected);

Router::reload();

Router::setRequestInfo(array(
array('pass' => array(), 'action' => 'admin_index', 'plugin' => null, 'controller' => 'posts', 'prefix' => 'admin', 'admin' => true, 'url' => array('url' => 'admin/posts')),
array('base' => '', 'here' => '/admin/posts', 'webroot' => '/')
));

Router::connect('/admin/posts/*', array('controller' => 'posts', 'action' => 'index', 'admin' => true));
Router::parse('/');

$result = Router::url(array('all'));
$expected = '/admin/posts/all';
$this->assertEqual($result, $expected);
}
/**
* testUrlGenerationWithPrefix method
Expand Down

0 comments on commit 12457ac

Please sign in to comment.