Skip to content
Mock HTTP client
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
spec
src
.editorconfig
.gitattributes
.gitignore
.php_cs
.scrutinizer.yml
.styleci.yml
.travis.yml
CHANGELOG.md
LICENSE
README.md
composer.json
phpspec.ci.yml
phpspec.yml.dist

README.md

Mock Client

Latest Version Software License Build Status Code Coverage Quality Score Total Downloads

Mock HTTP client

Install

Via Composer

$ composer require --dev php-http/mock-client

Usage

This client does not actually send requests to any server.

Instead it stores the request and returns a pre-set response or throws an exception. This client is useful for unit testing code that depends on a HTTPlug client to send requests and receive responses.

Documentation

Please see the mock client section in the official documentation.

Testing

$ composer test

Contributing

Please see our contributing guide.

Security

If you discover any security related issues, please contact us at security@php-http.org.

Credits

Thanks to David de Boer for implementing the mock client.

License

The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.