JsonBodyMatcher
extends AbstractSerializedBodyMatcher
in package
uses
JsonDecoderTrait
Structurally compares a decoded JSON request body.
Tags
Table of Contents
Methods
- __construct() : mixed
- AbstractSerializedBodyMatcher constructor.
- jsonDecode() : mixed
- json_decode which throws exception on error.
- matches() : bool
- Return true when the request satisfies this rule.
Methods
__construct()
AbstractSerializedBodyMatcher constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
jsonDecode()
json_decode which throws exception on error.
public
static jsonDecode(string $json[, bool $associative = false ][, int $depth = 512 ][, int $flags = 0 ]) : mixed
Parameters
- $json : string
- $associative : bool = false
- $depth : int = 512
- $flags : int = 0
Tags
matches()
Return true when the request satisfies this rule.
public
matches(RequestInterface $request) : bool
Parameters
- $request : RequestInterface