guzzle/client-integration-tests
Integration test suite for Guzzle HTTP client implementations. Provides shared fixtures and tests to verify PSR-7/PSR-18 behavior, compatibility, and edge cases across adapters and transports. Designed for package maintainers validating clients.
This package is not a runtime dependency—it’s a development-only tool for testing HTTP client behavior. It provides reusable integration test suites (e.g., for PSR-18 compliant clients like guzzlehttp/psr7 or symfony/http-client). To begin:
composer require --dev guzzle/client-integration-testsGuzzleHttp\IntegrationTests\IntegrationTestCase) in your own test suite.createClient() and getUri()) to return your PSR-18 client instance and base URI.Start by running the included example tests (often in tests/Integration/) to verify setup before adding your custom tests.
IntegrationTestCase.createClient().assertResponseContains() or assertResponseHeader() for clean, consistent test expectations.INTEGRATION_TEST_URL) to switch between mock endpoints (e.g., httpbin.org) or local test servers.httpbin.org) or configure a local mock server via createClient() to avoid flaky tests.getUri() or returning an invalid URI will cause silent failures—always validate return values.composer.json’s require-dev constraints to confirm PHP version support.setUp(), tearDown(), or getExpectedException() in your test class to inject custom setup (e.g., clearing interceptors) or test edge cases (e.g., network failures).How can I help you explore Laravel packages today?