diff --git a/cake/tests/lib/reporter/cake_text_reporter.php b/cake/tests/lib/reporter/cake_text_reporter.php index eef87a26b..34b5934d6 100644 --- a/cake/tests/lib/reporter/cake_text_reporter.php +++ b/cake/tests/lib/reporter/cake_text_reporter.php @@ -36,16 +36,18 @@ class CakeTextReporter extends CakeBaseReporter { * @return void */ public function paintDocumentStart() { - header('Content-type: text/plain'); + if (!headers_sent()) { + header('Content-type: text/plain'); + } } /** - * undocumented function + * Paints a pass * * @return void */ public function paintPass() { - + echo '.'; } /** @@ -75,7 +77,7 @@ class CakeTextReporter extends CakeBaseReporter { */ public function paintFooter($result) { if ($result->failureCount() + $result->errorCount() == 0) { - echo "OK\n"; + echo "\nOK\n"; } else { echo "FAILURES!!!\n"; } diff --git a/cake/tests/lib/test_manager.php b/cake/tests/lib/test_manager.php index 64e0d69b2..46bf37473 100644 --- a/cake/tests/lib/test_manager.php +++ b/cake/tests/lib/test_manager.php @@ -145,7 +145,7 @@ class TestManager { * Runs the main testSuite and attaches to it a reporter * * @param PHPUnit_Framework_TestListener $reporter Reporter instance to use with the group test being run. - * @return mixed Results of group test being run. + * @return PHPUnit_Framework_TestResult Result object of the test run. */ protected function run($reporter, $codeCoverage = false) { restore_error_handler();