diff --git a/Unit_testing/Reporter.php b/Unit_testing/Reporter.php index 131d85f..f0fd4f2 100644 --- a/Unit_testing/Reporter.php +++ b/Unit_testing/Reporter.php @@ -14,6 +14,7 @@ const STATUS_ERROR = 'ERROR'; const STATUS_WARNING = 'WARNING'; const STATUS_NOTE = 'NOTE'; + const STATUS_MISC = 'MISC'; function __construct( $verbosity ) { @@ -36,13 +37,13 @@ } /** - * $status is one of: PASSED, FAILED, ERROR, INCOMPLETE, SKIPPED, WARNING, NOTE, ...? - * $text is a printf-style string (although we actually use vprintf because of the array) - * $arguments is an array of arguments to $text + * $reportText is one of: PASSED, FAILED, ERROR, INCOMPLETE, SKIPPED, WARNING, NOTE, MISC, ...? + * $reportText is a printf-style string (although we actually use vprintf because of the array) + * $printfArguments is an array of arguments to $reportText */ - public function report( $statusText, $reportText, $printfArguments ) + public function report( $statusText, $reportText, $printfArguments, $nl = true ) { - if ( $this->verbosity ) vprintf( $statusText . $reportText, $printfArguments ); + if ( $this->verbosity ) vprintf( $statusText . $reportText . ( $nl ? "\n" : "" ), $printfArguments ); } }