Skip to content

Commit

Permalink
Adding tests to disprove #6306
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8148 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
markstory committed Apr 20, 2009
1 parent bbfee7b commit 6e91ee7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cake/tests/cases/libs/router.test.php
Expand Up @@ -1316,9 +1316,18 @@ function testUrlGenerationWithPrefixes() {
$expected = '/others/edit/1';
$this->assertEqual($result, $expected);

$result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true));;
$result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true));
$expected = '/protected/others/edit/1';
$this->assertEqual($result, $expected);

$result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true, 'page' => 1));
$expected = '/protected/others/edit/1/page:1';
$this->assertEqual($result, $expected);

Router::connectNamed(array('random'));
$result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true, 'random' => 'my-value'));
$expected = '/protected/others/edit/1/random:my-value';
$this->assertEqual($result, $expected);
}
/**
* testRemoveBase method
Expand Down

0 comments on commit 6e91ee7

Please sign in to comment.