edounar / phpspec-json-matcher
PhpSpec matcher 'shouldReturnJson'
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/edounar/phpspec-json-matcher
Requires
- php: >=5.3.6
- phpspec/phpspec: ~2.0
This package is not auto-updated.
Last update: 2025-10-11 22:47:00 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