PHPackages                             jfalque/http-mock - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. jfalque/http-mock

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

jfalque/http-mock
=================

Allows to create HTTP fixtures to mock tests

v1.0.1(9y ago)270.7k↓11.1%2MITPHPPHP &gt;=7

Since Jan 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/julienfalque/http-mock)[ Packagist](https://packagist.org/packages/jfalque/http-mock)[ RSS](/packages/jfalque-http-mock/feed)WikiDiscussions master Synced 1mo ago

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

HttpMock
========

[](#httpmock)

[![Build status](https://camo.githubusercontent.com/e89ce6e522972167366f800fcb0c17250b689b70894e46ad3eafbf7a41878338/68747470733a2f2f7472617669732d63692e6f72672f6a756c69656e66616c7175652f687474702d6d6f636b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/julienfalque/http-mock)[![Latest Stable Version](https://camo.githubusercontent.com/bab12e8c5209c11fec04ba4b63763bb2208a0ba7ad2afe96b169ebc82e02e251/68747470733a2f2f706f7365722e707567782e6f72672f6a66616c7175652f687474702d6d6f636b2f762f737461626c65)](https://packagist.org/packages/jfalque/http-mock)[![License](https://camo.githubusercontent.com/7c58127d19573cd8ef86b1cb840c9c4e715cbdaeac927891bf35eca07e3f97a2/68747470733a2f2f706f7365722e707567782e6f72672f6a66616c7175652f687474702d6d6f636b2f6c6963656e7365)](https://packagist.org/packages/jfalque/http-mock)

A HTTP server mock for automated tests.

**This package is archived and not maintained anymore.**

Testing code that makes HTTP calls is not simple: you either need to setup an actual HTTP server that provides the exact responses your tests require, or create mocks with complex assertions and/or expectations.

This package provides a server mock that can handle [PSR-7](http://www.php-fig.org/psr/psr-7/) HTTP requests. It also provides a [stream wrapper](http://php.net/manual/en/book.stream.php) that integrates the server into PHP's filesystem functions like `file_get_contents()`.

```
