-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPUnit's string comparison diff is not handled by ParaUnit #215
Comments
This is probably due to the fact that PHPUnit splits the failure message in multiple pieces on the inside. Depending of which PHPUnit version is in use, Paraunit fetches the error output from different places:
Do you get the issue in both cases? I fear it's a bit hard to be fixed on PHPUnit 9, since we're already using the full message that is being passed, while on PHPUnit 10 we have the full event, which may contain what we need. Could you dig a bit in PHPUnit's codebase? We need to understand where that diff is stored and how it's retrieved. |
We have PHP-CS-Fixer/PHP-CS-Fixer#6884 so we're yet to verify if problem remains on PHPUnit 10. On PHPUnit 9 I tried to utilise |
As discussed in PHP-CS-Fixer#7187 it looks like ParaUnit does not handle how PHPUnit displays output for diff-based assertions.
As a result, failures displayed in the ParaUnit's output miss important context.
It would be great if ParaUnit could catch whole PHPUnit's output and print it. Currently test output in PHP CS Fixer has this little flaw that you can't see what's the actual difference, you only see "Failed asserting that two strings are identical.", which requires running these tests locally and verifying what's the problem. This is not a big deal if there's the same failure for all PHP versions, but if it's only for specific version, it requires additional steps from developer (e.g. running through Docker). It would be just easier if there was diff in the CI output 🙂.
The text was updated successfully, but these errors were encountered: