Permalink
Browse files

Adding tests to disprove #6306

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8148 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent bbfee7b commit 6e91ee7ad4897cbcf1a2b65a1c5244953a3c4f8c @markstory markstory committed Apr 20, 2009
Showing with 10 additions and 1 deletion.
  1. +10 −1 cake/tests/cases/libs/router.test.php
@@ -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

0 comments on commit 6e91ee7

Please sign in to comment.