edounar / phpspec-json-matcher
PhpSpec matcher 'shouldReturnJson'
Package info
github.com/eugene-dounar/phpspec-json-matcher
pkg:composer/edounar/phpspec-json-matcher
1.0.0
2015-01-31 21:37 UTC
Requires
- php: >=5.3.6
- phpspec/phpspec: ~2.0
This package is not auto-updated.
Last update: 2026-03-01 01:01:27 UTC
README
PhpSpec matcher 'shouldReturnJson'.
Usage
class SomeSpec extends ObjectBehavior { it_should_return_json() { $this->getJson()->shouldReturnJson(' { "items": ['a', 'b', 'c'] } '); } }
Run phpspec with -v flag to see the difference between actual and expected JSON strings
Installation
Enable the extension in phpspec.yml
extensions: - EDounar\PhpSpec\JsonMatcher\Extension