Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mock Client Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs Buy: Eliminates the need to build/maintain a custom mock client, saving engineering resources and reducing technical debt.
  • Roadmap Integration: Accelerates CI/CD pipelines by enabling fast, isolated HTTP tests without external dependencies, supporting faster feature delivery.
  • Use Cases: Test edge cases (timeouts, 5xx errors, rate limits), validate request headers/payloads against API contracts, and simulate third-party service failures without real network calls.

When to Consider This Package

Adopt this package when your project uses HTTPlug or PSR-18-compliant HTTP clients and requires deterministic, isolated testing of HTTP interactions. Ideal for teams needing to simulate predefined responses/errors in unit tests while maintaining speed and reliability. Avoid if your stack uses non-PSR-18 clients (e.g., direct Guzzle usage without abstraction), requires dynamic response generation based on request content, or needs complex integration testing (e.g., stateful multi-service workflows—opt for Wire

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport