PHPackages                             l2iterative/mock-webserver-ext - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. l2iterative/mock-webserver-ext

ActiveLibrary[HTTP &amp; Networking](/categories/http)

l2iterative/mock-webserver-ext
==============================

A simple extension to donatj/mock-webserver with extra matching

1.1.0(2y ago)1141MITPHP

Since Jan 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/l2iterative/mock-webserver-ext)[ Packagist](https://packagist.org/packages/l2iterative/mock-webserver-ext)[ RSS](/packages/l2iterative-mock-webserver-ext/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (1)

An extension to Jesse Donat's `mock-webserver`
----------------------------------------------

[](#an-extension-to-jesse-donats-mock-webserver)

[![a group of actors sitting in a parade](title.png)](title.png)

This minimalistic library is intended to enable `donatj/mock-webserver` to handle more complex request definitions, by adapting the interfaces of `InterNations/http-mock` into it.

Most of the code appears to be a partial rewriting of the `Matcher` and `Expectation` implementation in `InterNations/http-mock`. Therefore, credits of the code should go to `InterNations/http-mock`.

### Why extending `donatj/mock-webserver`?

[](#why-extending-donatjmock-webserver)

We could have chosen not to use `donatj/mock-webserver` and instead to use `InterNations/http-mock`. We did not choose this path because `InterNations/http-mock` is somewhat archived, while `donatj/mock-webserver` is actively being maintained.

Another reason why we prefer `donatj/mock-webserver` is the simpler dependency, as `InterNations/http-mock` appears to use the Symfony framework, which could be a heavy machinery.

### How to use

[](#how-to-use)

The test script provides a self-explanatory example.

```
