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

Add PhpUnit rich diff for JSON string comparison #159

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

B-Galati
Copy link
Contributor

@B-Galati B-Galati commented Aug 1, 2019

This would help debugging:

❯ bin/phpunit --testdox --filter testmytest
PHPUnit 7.5.14 by Sebastian Bergmann and contributors.

Coduo\PHPMatcher\Tests\PHPUnit\PHPMatcherAssertions
 ✘ Mytest
   │
   │ Failed asserting that '{"foo":"bar"}' matches the pattern.
   │ "bar" does not match "@integer@".
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │  {
   │ -    "foo": "@integer@"
   │ +    "foo": "bar"
   │  }

The code was taken from PhpUnit JSON string asserts with few changes.

@B-Galati B-Galati force-pushed the phpunit-constraint branch from 30bd512 to f1db6c4 Compare August 1, 2019 07:29
@norberttech norberttech merged commit 0ad0105 into coduo:master Aug 1, 2019
@norberttech
Copy link
Member

Nice, I really like it! Thanks!

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

Successfully merging this pull request may close these issues.

2 participants