Skip to content

Commit

Permalink
Added test counter to each row.
Browse files Browse the repository at this point in the history
  • Loading branch information
rudowastaken committed Nov 15, 2017
1 parent 321b145 commit ff3f1c5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ class Printer extends ResultPrinter
*/
protected function writeProgress($progress)
{
$this->numTestsRun++;

if ($this->hasReplacementSymbol($progress)) {
$progress = static::$symbols[$progress];
}

$this->write("{$progress} {$this->testRow}" . PHP_EOL);
$this->column++;
$this->numTestsRun++;
$this->write("({$this->numTestsRun}/{$this->numTests}) {$progress} {$this->testRow}" . PHP_EOL);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/duration-test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

[32m✔[0m [37mPrinterDurationTest: Test Short[0m (%s ms)
[32m✔[0m [37mPrinterDurationTest: Test Long[0m ([33m%s[0m ms)
(1/2) [32m✔[0m [37mPrinterDurationTest: Test Short[0m (%s ms)
(2/2) [32m✔[0m [37mPrinterDurationTest: Test Long[0m ([33m%s[0m ms)


Time: %s, Memory: %sMB
Expand Down
10 changes: 5 additions & 5 deletions tests/names-test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

[32m✔[0m [37mPrinterNamesTest: Test It Supports Camel Case[0m (%s ms)
[32m✔[0m [37mPrinterNamesTest: Test It Supports Camel Case With CAPS Parts[0m (%s ms)
[32m✔[0m [37mPrinterNamesTest: It supports snake case[0m (%s ms)
[32m✔[0m [37mPrinterNamesTest: Itworkswithoutspacesaswell[0m (%s ms)
[32m✔[0m [37mPrinterNamesTest: Test Supports whatever Case[0m (%s ms)
(1/5) [32m✔[0m [37mPrinterNamesTest: Test It Supports Camel Case[0m (%s ms)
(2/5) [32m✔[0m [37mPrinterNamesTest: Test It Supports Camel Case With CAPS Parts[0m (%s ms)
(3/5) [32m✔[0m [37mPrinterNamesTest: It supports snake case[0m (%s ms)
(4/5) [32m✔[0m [37mPrinterNamesTest: Itworkswithoutspacesaswell[0m (%s ms)
(5/5) [32m✔[0m [37mPrinterNamesTest: Test Supports whatever Case[0m (%s ms)


Time: %s, Memory: %sMB
Expand Down
14 changes: 7 additions & 7 deletions tests/states-test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

[32m✔[0m [37mPrinterStatesTest: Test Success[0m (%s ms)
[31m✖[0m [31mPrinterStatesTest: Test Failure[0m (%s ms)
[31m![0m [31mPrinterStatesTest: Test Error[0m (%s ms)
[36mS[0m [36mPrinterStatesTest: Test Skipped[0m (%s ms)
[33mW[0m [33mPrinterStatesTest: Test Warning[0m (%s ms)
[33mR[0m [33mPrinterStatesTest: Test Risky[0m (%s ms)
[33mI[0m [33mPrinterStatesTest: Test Incomplete[0m (%s ms)
(1/7) [32m✔[0m [37mPrinterStatesTest: Test Success[0m (%s ms)
(2/7) [31m✖[0m [31mPrinterStatesTest: Test Failure[0m (%s ms)
(3/7) [31m![0m [31mPrinterStatesTest: Test Error[0m (%s ms)
(4/7) [36mS[0m [36mPrinterStatesTest: Test Skipped[0m (%s ms)
(5/7) [33mW[0m [33mPrinterStatesTest: Test Warning[0m (%s ms)
(6/7) [33mR[0m [33mPrinterStatesTest: Test Risky[0m (%s ms)
(7/7) [33mI[0m [33mPrinterStatesTest: Test Incomplete[0m (%s ms)


Time: %s, Memory: %sMB
Expand Down

0 comments on commit ff3f1c5

Please sign in to comment.