estahn/phpunit-json-assertions
Expressive JSON assertions for PHPUnit. Verify API responses and JSON documents by structure, values, and types without manually decoding payloads or hand-checking nested arrays. Works with existing test cases to keep your suite readable, precise, and concise.
estahn/phpunit-json-assertions adds expressive JSON assertions to PHPUnit, so you can verify API responses and payloads without decoding them by hand. Compare raw JSON strings against PHP arrays, fixture files, or expected subsets—and get clear, readable diffs when a structure doesn't match.
assertJsonMatchesArray() / assertJsonMatchesFile() for exact structural comparisonsassertJsonContains() and its negationcomposer require --dev estahn/phpunit-json-assertionsHow can I help you explore Laravel packages today?