I added support for faking a connection exception in a test (see https://github.com/laravel/framework/pull/53485), but I noticed that the request was not being recorded. That means asserting how many requests were sent is currently not correct. This PR fixes that.
Http::fake(['https://laravel.com' => Http::failedConnection()]);
try {
Http::get('https://laravel.com')
} catch (ConnectionException) {
}
Http::assertSentCount(1); // This would fail before this PR
I added support for faking a connection exception in a test (see https://github.com/laravel/framework/pull/53485), but I noticed that the request was not being recorded. That means asserting how many requests were sent is currently not correct. This PR fixes that.