Skip to content
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

Improve Behat output to include diffs on failed comparisons #17

Open
schlessera opened this issue Aug 16, 2018 · 1 comment
Open

Improve Behat output to include diffs on failed comparisons #17

schlessera opened this issue Aug 16, 2018 · 1 comment

Comments

@schlessera
Copy link
Member

When Behat compares two elements and finds them to not match, it would be helpful for debugging purposes to have a diff available that shows the exact difference between the two elements, like in this example output:

image 2018-08-16 at 9 21 38 am

The SebastianBergmann\Diff\Differ class is available and can be used for that.

@swissspidy
Copy link
Member

swissspidy commented Dec 11, 2024

Looks like an upcoming Behat release will have better diffs out of the box, see Behat/Behat#1532

Not in v3.16 yet, so have to wait for the next one.

Requires PHP 7.2+ though, see #228

Alternatively we can copy that logic of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants