sebastianbergmann/phpunit — pull request #481 by lloydwatkin (2012-02-03 14:50:11+00:00)
Title: Add ability to reference constants in expectedExceptionMessage annotation

The additional code and tests allow the user to utilise constants (in fact any PHP) in the @expectedExceptionMessage annotation for tests, e.g.:

/**
* @expectedException MyException
* @expectedExceptionMessage
*/

Obviously this can be done programmatically but I am a fan of using annotations for tests as it makes the code throwing the exception easier to see.