mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding Router test case for Ticket #3028
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5524 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ad75ecea81
commit
32e61a8adf
1 changed files with 5 additions and 9 deletions
|
@ -39,11 +39,6 @@ if (!defined('CAKE_ADMIN')) {
|
|||
*/
|
||||
class RouterTest extends UnitTestCase {
|
||||
|
||||
function RouterTest() {
|
||||
parent::UnitTestCase();
|
||||
$this->startTime = getMicrotime();
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
$this->router =& Router::getInstance();
|
||||
//$this->router->reload();
|
||||
|
@ -355,6 +350,11 @@ class RouterTest extends UnitTestCase {
|
|||
|
||||
$result = $this->router->parse('pages/display/home');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->router->reload();
|
||||
$this->router->connect('/page/*', array('controller' => 'test'));
|
||||
$result = $this->router->parse('/page/my-page');
|
||||
$expected = array('pass' => array('my-page'), 'plugin' => null, 'controller' => 'test', 'action' => 'index');
|
||||
}
|
||||
|
||||
function testAdminRouting() {
|
||||
|
@ -464,10 +464,6 @@ class RouterTest extends UnitTestCase {
|
|||
$expected = array('pass'=>array('contact'), 'plugin'=> null, 'controller'=>'pages', 'action'=>'display');
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
function testEnd() {
|
||||
pr(round(getMicrotime() - $this->startTime, 5));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in a new issue