Removing duplicate methods.

This commit is contained in:
mark_story 2011-02-12 22:32:16 -05:00
parent 4f65d0dbed
commit 0c09d08585
2 changed files with 3 additions and 25 deletions

View file

@ -161,6 +161,6 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
} elseif (include_once $appFile) {
$object = new $appClass(null, $this->_params);
}
$this->arguments['printer'] = $object;
return $this->arguments['printer'] = $object;
}
}

View file

@ -172,36 +172,14 @@ class CakeTestSuiteDispatcher {
* @return void
*/
function _testCaseList() {
$Reporter =& $this->getReporter();
$command = new CakeTestSuiteCommand('', $this->params);
$Reporter = $command->handleReporter($this->params['output']);
$Reporter->paintDocumentStart();
$Reporter->paintTestMenu();
$Reporter->testCaseList();
$Reporter->paintDocumentEnd();
}
/**
* Gets the reporter based on the request parameters
*
* @return void
* @static
*/
function &getReporter() {
if (!self::$_Reporter) {
$type = strtolower($this->params['output']);
$coreClass = 'Cake' . ucwords($this->params['output']) . 'Reporter';
$coreFile = CAKE_TESTS_LIB . 'reporter/cake_' . $type . '_reporter.php';
$appClass = $this->params['output'] . 'Reporter';
$appFile = APPLIBS . 'test_suite/reporter/' . $type . '_reporter.php';
if (include_once $coreFile) {
self::$_Reporter = new $coreClass(null, $this->params);
} elseif (include_once $appFile) {
self::$_Reporter = new $appClass(null, $this->params);
}
}
return self::$_Reporter;
}
/**
* Sets the params, calling this will bypass the auto parameter parsing.
*