Skip to content

php-http/mock-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 31, 2024
81f5582 · Oct 31, 2024

History

96 Commits
Sep 30, 2024
May 21, 2023
Oct 31, 2024
Dec 29, 2015
Jul 14, 2020
Jul 14, 2020
Dec 29, 2015
Dec 29, 2015
Dec 21, 2020
Oct 31, 2024
Feb 26, 2016
Apr 30, 2023
May 21, 2023
Jul 14, 2020
Dec 29, 2015

Repository files navigation

Mock Client

Latest Version Software License Build Status 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.