Mock HTTP client
Via Composer
composer require --dev php-http/mock-client
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.
Please see the mock client section in the official documentation.
composer test
Please see our contributing guide.
If you discover any security related issues, please contact us at security@php-http.org.
Thanks to David de Boer for implementing the mock client.
The MIT License (MIT). Please see License File for more information.