mikeerickson / phpunit-pretty-result-printer

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

Improve display of class name and wrapping of test results #6

Closed damiani closed 6 years ago

damiani commented 6 years ago

This PR fixes two display issues:

Truncated class names

Class names get aggressively truncated unless the terminal window is quite wide. For example, when the window is 120 columns wide, the output looks like this:

screen shot 2017-12-22 at 12 03 01 am

Instead, this PR respects the maxClassNameLength setting (which I've adjusted to 50 characters):

screen shot 2017-12-22 at 12 04 01 am

When the window is too narrow for that many characters, it splits the class name / results display into two columns of equal widths. The result looks like this:

screen shot 2017-12-22 at 12 14 24 am

Wrapping of test results

If test results extend beyond the edge of the window, they don't wrap/indent properly. Current behavior:

screen shot 2017-12-22 at 12 06 01 am

This fixes the display so 2nd and subsequent lines of results for a single test will properly wrap and align with the start of the previous line:

screen shot 2017-12-22 at 12 06 31 am
benjamincrozat commented 6 years ago

Can't wait for this fix to be implemented! I ran into the same issue.

devinfd commented 6 years ago

beautiful

mikeerickson commented 6 years ago

@benjamincrozat @devinfd This PR has been merged, now available in 0.4.0 version

mikeerickson commented 6 years ago

@damiani Thanks for PR, this has been on my "todo" list for quite sometime, but been slammed of late

damiani commented 6 years ago

@mikeerickson Happy to help!

devinfd commented 6 years ago

Already got it. Looks great, thanks!

Devin

On Dec 22, 2017, at 7:52 AM, Keith Damiani notifications@github.com wrote:

@mikeerickson https://github.com/mikeerickson Happy to help!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikeerickson/phpunit-pretty-result-printer/pull/6#issuecomment-353624010, or mute the thread https://github.com/notifications/unsubscribe-auth/AAclr8NoS-JZszup_KXL00V1FkakW2Z1ks5tC9AygaJpZM4RKp5T.

mikeerickson commented 6 years ago

@devinfd 👍