Permalink
Browse files

Also trigger error for \Exception.

  • Loading branch information...
1 parent 452f50a commit ecfbc2144cd3d870c7eb05b744850a1ed7eb9f3b @sebastianbergmann committed Oct 24, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 PHPUnit/Framework/TestCase.php
@@ -451,7 +451,7 @@ public function getExpectedException()
*/
public function setExpectedException($exceptionName, $exceptionMessage = '', $exceptionCode = 0)
{
- if ($exceptionName == 'Exception') {
+ if ($exceptionName == 'Exception' || $exceptionName == '\\Exception') {
throw new InvalidArgumentException(
'You must not expect the generic exception class.'
);

0 comments on commit ecfbc21

Please sign in to comment.