From 0901b0abee9d10e656527e51c9de79126f99a5f4 Mon Sep 17 00:00:00 2001 From: Bruno Gaspar Date: Wed, 15 Nov 2017 18:09:13 +0000 Subject: [PATCH] chore: Added padding for the total tests run. (#10) --- src/Printer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Printer.php b/src/Printer.php index 9600b29..5249185 100644 --- a/src/Printer.php +++ b/src/Printer.php @@ -44,7 +44,9 @@ protected function writeProgress($progress) $progress = static::$symbols[$progress]; } - $this->write("({$this->numTestsRun}/{$this->numTests}) {$progress} {$this->testRow}" . PHP_EOL); + $padding = str_pad($this->numTestsRun, strlen($this->numTests), ' ', STR_PAD_LEFT); + + $this->write("({$padding}/{$this->numTests}) {$progress} {$this->testRow}" . PHP_EOL); } /**