Skip to content

Commit

Permalink
updating some tests for php4
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8280 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
gwoo committed Aug 3, 2009
1 parent 303b488 commit 57552c2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cake/tests/cases/console/libs/acl.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function endCase() {
function startTest() {
$this->Dispatcher =& new TestAclShellMockShellDispatcher();
$this->Task =& new MockAclShell($this->Dispatcher);
$this->Task->Dispatch = new $this->Dispatcher;
$this->Task->Dispatch =& $this->Dispatcher;
$this->Task->params['datasource'] = 'test_suite';
}

Expand Down
4 changes: 2 additions & 2 deletions cake/tests/cases/console/libs/api.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ApiShellTest extends CakeTestCase {
function startTest() {
$this->Dispatcher =& new ApiShellMockShellDispatcher();
$this->Shell =& new MockApiShell($this->Dispatcher);
$this->Shell->Dispatch = new $this->Dispatcher;
$this->Shell->Dispatch =& $this->Dispatcher;
}
/**
* tearDown method
Expand Down Expand Up @@ -107,7 +107,7 @@ function testMethodNameDetection () {
)
);
$this->Shell->expectAt(1, 'out', $expected);

$this->Shell->args = array('controller');
$this->Shell->paths['controller'] = CAKE_CORE_INCLUDE_PATH . DS . LIBS . 'controller' . DS;
$this->Shell->main();
Expand Down
14 changes: 10 additions & 4 deletions cake/tests/cases/console/libs/shell.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,23 @@
ob_end_clean();
}

Mock::generatePartial(
'ShellDispatcher', 'TestShellMockShellDispatcher',
array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment')
);
Mock::generatePartial('ShellDispatcher', 'TestShellMockShellDispatcher', array(
'getInput', 'stdout', 'stderr', '_stop', '_initEnvironment'
));
/**
* TestShell class
*
* @package cake
* @subpackage cake.tests.cases.console.libs
*/
class TestShell extends Shell {
/**
* Fixtures used in this test case
*
* @var name
* @access public
*/
var $name = 'TestShell';
}
/**
* TestAppleTask class
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/console/libs/tasks/test.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TestTaskTest extends CakeTestCase {
function setUp() {
$this->Dispatcher =& new TestTestTaskMockShellDispatcher();
$this->Task =& new MockTestTask($this->Dispatcher);
$this->Task->Dispatch = new $this->Dispatcher;
$this->Task->Dispatch =& $this->Dispatcher;
}
/**
* tearDown method
Expand Down

0 comments on commit 57552c2

Please sign in to comment.