mercredi 28 novembre 2018

PHP/Laravel How To Prevent All Functions Under One File

There is a helper file that should not be run when the unit testing is running. What is the best way to prevent all functions from being executed when the unit test is running without having to put condition on every function in the helper?

I tried to return false on constructor along with App::runningUnitTests(), but as many of you know, the constructor in php does not return anything, therefore it does not work.

Any suggestion or advice would be appreciated. Thank you in advance.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2RjB7ip
via IFTTT

Aucun commentaire:

Enregistrer un commentaire