Skip to content
Permalink
Browse files

Adding testcase for bug #44

  • Loading branch information...
farhadi authored and markstory committed Aug 20, 2009
1 parent 4f44111 commit 12457ac6f939eb63633d1bb712ae1f5ae24f97e4
Showing with 14 additions and 0 deletions.
  1. +14 −0 cake/tests/cases/libs/router.test.php
@@ -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

0 comments on commit 12457ac

Please sign in to comment.
You can’t perform that action at this time.