mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Making CakeTextReporter work a little nicer in a CLI context.
Updating documentation on TestManager.
This commit is contained in:
parent
0baab93929
commit
bbf5a051e0
2 changed files with 7 additions and 5 deletions
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue