diff --git a/Unit_testing/Reporter/TextReporter.php b/Unit_testing/Reporter/TextReporter.php new file mode 100644 index 0000000..f1d4ece --- /dev/null +++ b/Unit_testing/Reporter/TextReporter.php @@ -0,0 +1,45 @@ +getVerbosity() ) + { + $statusText = ''; + switch ( $status ) + { + case Reporter::STATUS_PASS: + $statusText = '+++ '; + break; + case Reporter::STATUS_SKIPPED: + $statusText = '### '; + break; + case Reporter::STATUS_INCOMPLETE: + $statusText = '%%% '; + break; + case Reporter::STATUS_FAILURE: + $statusText = '--- '; + break; + case Reporter::STATUS_ERROR: + $statusText = 'EEE '; + break; + case Reporter::STATUS_WARNING: + $statusText = '!!! '; + break; + case Reporter::STATUS_NOTE: + $statusText = '!!! '; + break; + default: + $statusText = '??? '; + break; + } + if ( $this->getVerbosity() > 1 ) $statusText = $statusText . $status . ': '; + + parent::report( $statusText, $reportText . "\n", $printfArguments ); + } + } +} + +?>