Making CakeTextReporter work a little nicer in a CLI context.

Updating documentation on TestManager.
This commit is contained in:
mark_story 2010-06-26 13:48:55 -04:00
parent 0baab93929
commit bbf5a051e0
2 changed files with 7 additions and 5 deletions

View file

@ -36,16 +36,18 @@ class CakeTextReporter extends CakeBaseReporter {
* @return void
*/
public function paintDocumentStart() {
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";
}

View file

@ -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();