edounar / phpspec-json-matcher
PhpSpec matcher 'shouldReturnJson'
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: 2025-03-01 19:37:18 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