diff --git a/Unit_testing/Reporter.php b/Unit_testing/Reporter.php index 5eb0df0..9d3b5f1 100644 --- a/Unit_testing/Reporter.php +++ b/Unit_testing/Reporter.php @@ -23,7 +23,7 @@ public static function pluralise( $count, $oneText, $manyText ) { - return ( $count > 1 ) ? $manyText : $oneText; + return ( abs( $count ) !== 1 ) ? $manyText : $oneText; } public function setVerbosity( $newVerbosity ) @@ -43,7 +43,7 @@ */ public function report( $statusText, $reportText, $printfArguments ) { - if ( $this->verbosity ) vprintf( $statusText . $reportText, $printfArguments ); + if ( $this->verbosity ) vprintf( $statusText . $reportText . "\n", $printfArguments ); } abstract public function hr();