I want to format PHPUnit output like this:
1/15. ATestCaseTest ... passed (3/3), time: 0ms
1/59. DISABLED_test1 ... skipped , time: 0ms
2/59. test2 ... passed , time: 1497ms
3/59. test3 ... passed , time: 593ms
2/15. AnotherTestCaseTest ... passed (2/2), time: 0ms
4/59. Test4 ... passed , time: 49ms
5/59. Test5 ... passed , time: 0ms
.....
Test cases run: 15/15, tests passed: 58/59, Asserts: 100/100, Failures: 0, Exceptions: 0
"passed" will be green, skipped - orange, failed - red
the summary line will also have color coding - green if everything passed (or skipped), red if something failed
I don't find any documentation of phpunit classes. Only a quick-guide-type documentation with just few examples: https://phpunit.de/manual/4.8/en/extending-phpunit.html
I tried looking at code/comments, but it seems too much work for the simple task I need to do.
Update:
What I couldn't find is:
- How do I run my code after all test cases finish and how do I pass the information from the TestListener.
- How do I replace phpunit's out (the dots .......) with the one above. Currently my stats are output together with the dots and it looks a bit messy.