pock

HeadersMatcher
in package
implements RequestMatcherInterface

Matches required values across several headers while allowing additional headers and values.

Tags
category

HeadersMatcher

Table of Contents

Interfaces

RequestMatcherInterface
Contract for reusable request matching rules registered through PockBuilder::addMatcher().

Methods

__construct()  : mixed
HeadersMatcher constructor.
matches()  : bool
Return true when the request satisfies this rule.

Methods

__construct()

HeadersMatcher constructor.

public __construct(array<string, string|array<string|int, string>> $headers) : mixed
Parameters
$headers : array<string, string|array<string|int, string>>

matches()

Return true when the request satisfies this rule.

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

Search results