php-http/mock-client
Mock HTTP client for HTTPlug/PHP-HTTP. Stores outgoing requests and returns queued responses or throws exceptions instead of making real network calls—ideal for unit tests of HTTP-dependent code. Install via Composer as a dev dependency.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| php-mock/php-mock-integration | 0.86 | Integration layer for php-mock, making it easy to use PHP function mocks within popular test frameworks. Helps you stub built-in functions like time(), rand(), and file operations in specific namespaces, enabling reliable, isolated unit tests without touching global state. | 14 | 14 | 6 | 306K | 0 | 23.0 | 65.0 | WTFPL | 2 months ago | |
| php-mock/php-mock | 0.86 | Mock built-in PHP functions like time() or rand() in tests by leveraging PHP’s namespace fallback: define namespaced replacements for unqualified calls. Works in non-global namespaces; supports common test frameworks via integrations (e.g., PHPUnit). | 369 | 374 | 20 | 545K | 3 | 28.0 | 51.9 | WTFPL | 2 months ago | |
| php-mock/php-mock-mockery | 0.84 | Integrates php-mock with Mockery to mock PHP built-in functions in tests. Create namespaced function mocks with PHPMockery::mock() and set expectations/returns, then call Mockery::close(). Supports only unqualified calls; define early if needed. | 39 | 39 | 5 | 64K | 2 | 21.9 | 52.1 | WTFPL | 1 year ago | |
| tomb1n0/guzzle-mock-handler | 0.84 | Lightweight mock handler for Guzzle to fake HTTP responses in tests. Queue responses, simulate status codes, headers, and body content, and inspect requests without making real network calls—useful for unit/integration testing of API clients. | 3 | 3 | 2 | 2K | 4 | 1.1 | 37.9 | MIT | — | |
| php-http/client-integration-tests | 0.82 | Integration test suite for PHP-HTTP clients. Helps verify that any HTTPlug/PSR-18 compatible client behaves correctly and consistently across common scenarios, making it easier to validate implementations and avoid regressions. | 16 | 17 | 9 | 526 | 1 | 24.4 | 24.5 | MIT | 4 months ago |
How can I help you explore Laravel packages today?