Matchers
Table of Contents
Interfaces
- RequestMatcherInterface
- Contract for reusable request matching rules registered through PockBuilder::addMatcher().
Classes
- AbstractRegExpMatcher
- Base matcher that applies a configured PCRE expression to extracted request data.
- AbstractSerializedBodyMatcher
- Base matcher for bodies decoded into recursively compared PHP arrays.
- AnyRequestMatcher
- Matches every request, used automatically when a response has no explicit matcher.
- BodyMatcher
- Compares the complete request body with string, resource, or PSR-7 stream contents.
- CallbackRequestMatcher
- Delegates request matching to an application callback.
- ExactFormDataMatcher
- Matches the complete URL-encoded form field collection without allowing additional fields.
- ExactHeaderMatcher
- Matches the complete value list of one header.
- ExactHeadersMatcher
- Matches the complete header collection, excluding the transport-generated Host header.
- ExactQueryMatcher
- Matches the complete decoded query parameter collection.
- FormDataMatcher
- Partially matches URL-encoded form fields while allowing additional fields.
- HeaderLineMatcher
- Compares a header's unparsed comma-separated line.
- HeaderLineRegexpMatcher
- Applies a PCRE pattern to a header's unparsed line.
- HeaderMatcher
- Matches required values in one header while allowing additional values.
- HeadersMatcher
- Matches required values across several headers while allowing additional headers and values.
- HostMatcher
- Matches the host component of a request URI.
- JsonBodyMatcher
- Structurally compares a decoded JSON request body.
- MethodMatcher
- Matches the HTTP request method.
- MultipartFormDataMatcher
- Parses a multipart request body and delegates matching to a StreamedPart callback.
- MultipleMatcher
- Combines several request matchers with AND semantics.
- PathMatcher
- Matches a request path, treating the leading slash as optional.
- PortMatcher
- Matches the explicit or scheme-default request port.
- QueryMatcher
- Partially matches decoded query parameters while allowing additional parameters.
- RegExpBodyMatcher
- Applies a PCRE pattern to the complete request body.
- RegExpPathMatcher
- Applies a PCRE pattern to the request path.
- RegExpQueryMatcher
- Applies a PCRE pattern to the raw request query string.
- RegExpUriMatcher
- Applies a PCRE pattern to the complete request URI.
- SchemeMatcher
- Matches the scheme component of a request URI.
- UriMatcher
- Compares the complete request URI with a string or PSR-7 URI.
- XmlBodyMatcher
- Structurally compares XML when DOM and XSL are available, with exact-text fallback otherwise.