pock

JsonBodyMatcher extends AbstractSerializedBodyMatcher
in package
Uses JsonDecoderTrait

Class JsonBodyMatcher

Tags
category

JsonBodyMatcher

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
phpstan-ignore-next-line
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
throws
JsonException
SuppressWarnings

(PHPMD.BooleanArgumentFlag)

Return values
mixed

matches()

Returns true if request is matched by this matcher.

public matches(RequestInterface $request) : bool
Parameters
$request : RequestInterface
Tags
inheritDoc
Return values
bool

Search results