sebastianbergmann/phpunit — pull request #717 by marekkalnik (2012-11-14 01:43:46+00:00)
Title: ClassExists - constraint for testing if a string is a registered class

Mentionned in #716.

In some cases you need to check if a method returns a string that is a valid classname. One of these examples is a data_class option in Symfony2 forms.

It is possible to do it with a callback or constraints, but this would provide a shorthand method with a default error message and all other pros of real constraints.