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
{{ message }}
This repository was archived by the owner on Jun 15, 2021. It is now read-only.
I've been trying to run unit tests on our CI system, but the tests that have the @ExpectedException docblock appear to fail. I have found that using $this->setExpectedException('Exception') works as expected.
It would probably be good practice to use the setExpectedException() right before calling the code that triggers the exception, since some of these tests perform multiple asserts. In the case that an exception is thrown in one of the earlier asserts, phpunit will consider the test successful.