Cancel event before propagation

I'm using Laravel events for broadcasting to pusher package (I'm using Laravel websockets, so it's not actually pusher). But I need to run it while doing my tests. I can prevent the event locally using \App::runningUnitTests(). But I need to centralize it so when placing new events, forgetting to add that line won't be a problem. Maybe something with EventServiceProvider?

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us