Adding tests to disprove #6306

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8148 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2009-04-20 07:36:26 +00:00
parent bbfee7ba17
commit 6e91ee7ad4

View file

@ -1316,9 +1316,18 @@ class RouterTest extends CakeTestCase {
$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