updating dispatcher test

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7504 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-08-25 22:57:24 +00:00
parent ecac053ea2
commit 47d36456f8

View file

@ -44,9 +44,9 @@ class TestDispatcher extends Dispatcher {
* @access protected
* @return void
*/
function _invoke(&$controller, $params, $missingAction) {
function _invoke(&$controller, $params) {
restore_error_handler();
if ($result = parent::_invoke($controller, $params, $missingAction)) {
if ($result = parent::_invoke($controller, $params)) {
if ($result === 'missingAction') {
return $result;
}
@ -710,7 +710,7 @@ class DispatcherTest extends CakeTestCase {
'size' => 80469,
)));
$this->assertEqual($result['data'], $expected);
$_FILES = array(
'data' => array(
'name' => array(
@ -739,7 +739,7 @@ class DispatcherTest extends CakeTestCase {
'passport' => 'application/octet-stream',
'drivers_license' => 'application/octet-stream',
)
)
)
),
'tmp_name' => array(
'Document' => array(
@ -784,8 +784,8 @@ class DispatcherTest extends CakeTestCase {
)
)
)
);
$Dispatcher =& new Dispatcher();
);
$Dispatcher =& new Dispatcher();
$result = $Dispatcher->parseParams('/');
$expected = array(
'Document' => array(
@ -838,7 +838,7 @@ class DispatcherTest extends CakeTestCase {
)
);
$this->assertEqual($result['data'], $expected);
$_FILES = array();
}
/**
@ -865,6 +865,7 @@ class DispatcherTest extends CakeTestCase {
$_GET['url'] = array();
Configure::write('App.base', '/control');
$Dispatcher =& new Dispatcher();
$Dispatcher->baseUrl();
$uri = '/control/students/browse';
$result = $Dispatcher->getUrl($uri);
$expected = 'students/browse';