Skip to content
Advertisement

How to “mock” Sentry client in the PHPUnit tests

In case if you need to test PHP application error handlers, you have to “mock” or just disable sending errors on remote servers in the Sentry client. What is the right way to do this?

Advertisement

Answer

This is the example for Laravel, but this approach should work for any framework.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement