Permalink
Browse files

updating some tests for php4

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8280 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent 303b488 commit 57552c25fc99165b1f4d96da5c6201ee158eadd6 gwoo committed Aug 3, 2009
@@ -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';
}
@@ -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
@@ -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();
@@ -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
@@ -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

0 comments on commit 57552c2

Please sign in to comment.