mikeerickson / phpunit-pretty-result-printer

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

Wrap to newline at the expected output sequence #113

Closed DaneEveritt closed 6 years ago

DaneEveritt commented 6 years ago

The checkmarks are technically two columns, and then there is a space after them, thus we need to move the cursor 3 places, and not two.

This fixes https://github.com/mikeerickson/phpunit-pretty-result-printer/issues/104

DaneEveritt commented 6 years ago

I considered using mb_strlen to determine the character length and then adding one to that, but then you'd need that package installed, which would potentially be a breaking change for this package.

So, if you have something as the marker that is only technically a length of 1, you'll have a somewhat squashed output. For example:

mikeerickson commented 6 years ago

@DaneEveritt Thank Dane, this has been on my mental fix list for sometime, but Ive been stuck on a work project. This should make some other users happy ;-)