mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
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:
parent
ecac053ea2
commit
47d36456f8
1 changed files with 8 additions and 7 deletions
|
@ -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';
|
||||
|
|
Loading…
Add table
Reference in a new issue