sebastianbergmann/phpunit — pull request #1328 by dreis2211 (2014-07-10 15:05:09+00:00)
Title: PHPUnit 4.2: Exceptions with chars used by regular expression can break tests

Hey,

we just tried to use PHPUnit 4.2 on our project and ran into a rather tricky problem, from which I've created a simpler example project you can use to test this bug.

https://github.com/dreis2211/phpunit-exception-test

or you try to run this
```php
setExpectedException('Exception', '[Have you done something wrong? Try again.]');

$model = new ExampleClass();
$model->doSomething();
}
}
```

This behaviour was most likely introduced with the following commit.
https://github.com/sebastianbergmann/phpunit/commit/f8826506baf9ec673aaf56887a6682093bccffb1

Cheers,

dreis2211