Skip to content

Commit

Permalink
Adding doc blocks and correcting constructor of CakeCliReporter
Browse files Browse the repository at this point in the history
Fixing TestSuite console code coverage output.
  • Loading branch information
markstory committed Jan 10, 2010
1 parent bcd7d34 commit f4bda62
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
7 changes: 6 additions & 1 deletion cake/console/libs/testsuite.php
Expand Up @@ -278,7 +278,11 @@ function __canRun() {
* @access private
*/
function __run() {
$Reporter = new CakeCliReporter();
$Reporter = new CakeCliReporter('utf-8', array(
'app' => $this->Manager->appTest,
'plugin' => $this->Manager->pluginTest,
'group' => ($this->type === 'group')
));

if ($this->type == 'all') {
return $this->Manager->runAllTests($Reporter);
Expand Down Expand Up @@ -332,6 +336,7 @@ function __run() {
$result = $this->Manager->runTestCase($case, $Reporter);
if ($this->doCoverage) {
CodeCoverageManager::report();
$this->out();
}

return $result;
Expand Down
24 changes: 21 additions & 3 deletions cake/tests/lib/reporter/cake_cli_reporter.php
Expand Up @@ -34,11 +34,29 @@
* @subpackage cake.tests.libs.reporter
*/
class CakeCliReporter extends CakeBaseReporter {

/**
* separator string for fail, error, exception, and skip messages.
*
* @var string
*/
var $separator = '->';

function CakeCLIReporter($separator = NULL) {
$this->SimpleReporter();
/**
* array of 'request' parameters
*
* @var array
*/
var $params = array();

/**
* Constructor
*
* @param string $separator
* @param array $params
* @return void
*/
function CakeCLIReporter($separator = NULL, $params = array()) {
$this->CakeBaseReporter('utf-8', $params);
if (!is_null($separator)) {
$this->setFailDetailSeparator($separator);
}
Expand Down

0 comments on commit f4bda62

Please sign in to comment.