mikeerickson / phpunit-pretty-result-printer

PHPUnit Pretty Result Printer -- make your PHPUnit tests look pretty!
MIT License
1.2k stars 71 forks source link

Pretty print assertions #125

Closed kanatkubash closed 5 years ago

kanatkubash commented 5 years ago

It would be great if assertions were prettified as in mocha:

image

mikeerickson commented 5 years ago

@kanatkubash I am trying to figure out exactly what you are asking for here? Using the sample output below (which covers all supported PHPUnit test results), what are you proposing

image

kanatkubash commented 5 years ago

Currently it shows assertion error as plain text : image

I thought it would be readable if expected and actual values are printed in diff way: colored and on separate lines. Rather than reading assertion output in form of Failed asserting that %s matches expected %s Like here: image

mikeerickson commented 5 years ago

@kanatkubash OK, now i understand what you are saying. The current display is default PHPUnit output, but we can override that as well. I will have a closer look now that i know what you are asking for :-) Would be nice to make it look even better!

mikeerickson commented 5 years ago

@kanatkubash Hey there, I have made some adjustments to reporting, overriding some of the PHPUnit default reports to add some additional color (supports failures, errors, skipped, incomplete and risky tests). It has been included in the 0.23.0 release