Summer Sale! All accounts are 50% off this week.

dmag's avatar
Level 6

Disable http ssl verify for tests

How can I disable verifying of ssl for all http requests made with Laravel's Http facade when running Laravel (phpunit) tests on external APIs?

0 likes
3 replies
dmag's avatar
Level 6

@christian-qode sorry, but it's not what I was asking about. I have multiple apis that use their own Http facade instance to make their calls, so I cannot go through each and one of them to add ::withoutVerifying() every time I'm running tests. What I was looking for is if I can set this option for all http calls in the test file for the runtime of the test. Something similar to how you'd set Http::fake() to have all http calls faked for that runtime.

Please or to participate in this conversation.