pagely/http-mock

Mock HTTP requests on the server side in your PHP unit tests, PSR/7 Fork of internations version

Maintainers

Details

github.com/pagely/http-mock

Source

Installs: 139 228

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 61

1.0.1 2020-04-07 14:28 UTC

README

Mock HTTP requests on the server side in your PHP unit tests.

HTTP Mock for PHP mocks the server side of an HTTP request to allow integration testing with the HTTP side. It uses PHP’s builtin web server to start a second process that handles the mocking. The server allows registering request matcher and responses from the client side.

BIG FAT WARNING: software like this is inherently insecure. Only use in trusted, controlled environments. This is a fork of https://github.com/internations/http-mock

Its been updated to use PSR/7 Http methods, and Slim on the server side. The API has been kept the same where possible, but any direct use of Request or Response objects will be different.

Usage

composer require --dev pagely/http-mock

Read the docs