sebastianbergmann/phpunit — pull request #1312 by ezzatron (2014-07-01 06:38:02+00:00)
Title: Resolve expected exception annotations against namespace and use statements.

This PR is an updated version of #1279 (see also #730). At this stage, it's just a request for feedback, but if reception is good, I'd be happy to expand the new resolution rules to other annotations like `@covers` etc.

To recap, this PR allows the user to utilize `namespace` and `use` statements to shorten the class name for `@expectedException` annotations. I also expanded on #1279 to add similar support to the `@expectedExceptionMessage` and `@expectedExceptionCode` annotations. Relevant tests were also added/updated.

This is currently done using a branch of [Cosmos](https://github.com/eloquent/cosmos/tree/feature/pathogen-based), which will become the next major version as soon as people are happy with this PR.

FYI, Cosmos now fully supports PHP 5.6 `use function` and `use const`, which means no problems with resolution when you move to support 5.6 in future.