JsonBodyMatcher
extends AbstractSerializedBodyMatcher
in package
Uses
JsonDecoderTrait
Class JsonBodyMatcher
Tags
Table of Contents
- __construct() : mixed
- AbstractSerializedBodyMatcher constructor.
- jsonDecode() : mixed
- json_decode which throws exception on error.
- matches() : bool
- Returns true if request is matched by this matcher.
Methods
__construct()
AbstractSerializedBodyMatcher constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
Return values
mixed —jsonDecode()
json_decode which throws exception on error.
public
static jsonDecode(string $json[, bool $associative = false ][, int $depth = 512 ], int $flags) : mixed
Parameters
- $json : string
- $associative : bool = false
- $depth : int = 512
- $flags : int
Tags
Return values
mixed —matches()
Returns true if request is matched by this matcher.
public
matches(RequestInterface $request) : bool
Parameters
- $request : RequestInterface