Skip to content

Commit

Permalink
- Merge [1711].
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 24, 2007
1 parent 22e70ad commit 766300f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions PHPUnit/Framework/TestCase.php
Expand Up @@ -258,9 +258,7 @@ public function getExpectedException()
*/
public function setExpectedException($exceptionName)
{
if ((is_string($exceptionName) && class_exists($exceptionName)) || $exceptionName === NULL) {
$this->expectedException = $exceptionName;
}
$this->expectedException = $exceptionName;
}

/**
Expand Down Expand Up @@ -420,7 +418,7 @@ protected function runTest()
}

catch (Exception $e) {
if ($this->expectedException !== NULL &&
if (is_string($this->expectedException) &&
$e instanceof $this->expectedException) {
return;
} else {
Expand Down

0 comments on commit 766300f

Please sign in to comment.