sebastianbergmann/phpunit — Issue #400: Testing Exceptions
Author: alcohol
Created: 2011-11-07 15:55:04+00:00
State: open

> You should be as specific as possible when testing exceptions. Testing for classes that are too generic might lead to undesirable side-effects. Accordingly, testing for the Exception class with @expectedException or setExpectedException() is no longer permitted.

Perhaps my tone wasn't appreciated; so here is a friendlier approach!

Care to comments on why you will not allow us to test against regular Exceptions? Whilst I can see the use for more specific Exceptions, I fail to see why this should be a "requirement". Perhaps make it part of the --strict option?