PHPackages                             makeweb/test-server - 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. makeweb/test-server

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

makeweb/test-server
===================

Create a simple HTTP server on your local environment capable of handling responses for test purposes

1.0.0(8y ago)22141MITPHP

Since Apr 23Pushed 8y ago2 watchersCompare

[ Source](https://github.com/makewebau/test-server)[ Packagist](https://packagist.org/packages/makeweb/test-server)[ RSS](/packages/makeweb-test-server/feed)WikiDiscussions master Synced yesterday

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

MakeWeb Test Server
===================

[](#makeweb-test-server)

Test code which sends HTTP requests by spinning up an actual HTTP server on your local environment.

The server serves a basic Lumen app served with PHP's built in development web server. You can then define the behaviour of the test server by adding routes with closures right in your test code. This way we can keep the test code which relies on specific server behaviour tightly coupled with the code which defines the behaviour.

The idea and original code was forked from the implementation of a web server for testing KiteTail's Zttp library by Adam Wathan. Do check out [Zttp](https://github.com/kitetail/zttp), and [KiteTail](https://kitetail.co/).

Installation
------------

[](#installation)

### Install with Composer

[](#install-with-composer)

```
composer require makeweb/test-server

```

Basic usage
-----------

[](#basic-usage)

```
