Skip to content

Commit

Permalink
Removing duplicate methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 13, 2011
1 parent 4f65d0d commit 0c09d08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion cake/tests/lib/cake_test_suite_command.php
Expand Up @@ -161,6 +161,6 @@ public function handleReporter($reporter) {
} elseif (include_once $appFile) {
$object = new $appClass(null, $this->_params);
}
$this->arguments['printer'] = $object;
return $this->arguments['printer'] = $object;
}
}
26 changes: 2 additions & 24 deletions cake/tests/lib/cake_test_suite_dispatcher.php
Expand Up @@ -172,36 +172,14 @@ function _checkXdebug() {
* @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.
*
Expand Down

0 comments on commit 0c09d08

Please sign in to comment.