You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's already possible.
If you don't "care" much about the assertion, you just want to throw an exception on a specific request, you use something like this
(new GuzzleMockResponse('random-path'))
->withBody(['status' => 'running'])
->withStatus(SymfonyResponse::HTTP_OK)
->withAssertion(function() {
throw new ConnectException('Empty server reply', new Request('GET', '/random-path'));
})
->once(),
First of all, thank you for this amazing package!
Love the additional assertions you can do on top of the guzzle handler stack!
With the current Guzzle handler you're allowed to set a
RequestException
in the handler stackWould be nice to have some functionality to support this in the current package.
See original Guzzle docs and look for https://docs.guzzlephp.org/en/stable/testing.html
The text was updated successfully, but these errors were encountered: