matthiasnoback/SymfonyConfigTest — pull request #14 by fvdb (2014-10-09 10:46:31+00:00)
Title: Ensured exception message regex matching keeps working with PHPUnit >=4.3.0

Before PHPUnit 4.3.0, you could use PHPUnit_Framework_Constraint_ExceptionMessage to match an exception message using either a sub string, or a regular expression. Support for this was removed in this commit: https://github.com/sebastianbergmann/phpunit/commit/eee0584884b9b69937226731a7baae0c6807b733

This means that if you use regular expressions to match invalid configuration exception messages, you need to change those to now use substrings instead.

This PR allows you to simply set an extra parameter "useRegExp" to true, which causes SymfonyConfigTest to instantiate the correct constraint class when using PHPUnit >= 4.3.0. The flag does nothing below 4.3.0, as the existing constraint class will support regular expressions just fine.