Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove test suite's live HTTP request to example.com (laravel#38410)
Event Illuminate\Http\Client\Events\ConnectionFailed can randomly be dispatched by testClonedClientsWorkSuccessfullyWithTheRequestObject() on some test suite runs which causes this test case to fail. This HTTP client test is making an actual HTTP request to example.com that can intermittently fail. Remove this unreliable external dependency. Mock the response so the Guzzle handler middleware stack still runs to dispatch events RequestSending & ResponseReceived. Also move Mockery `m::close()` into PHPUnit's `tearDown()` lifecycle since failed test cases will cause registered mocks to leak into subsequent test cases.
- Loading branch information