Permalink
Browse files

More work on Prophecy support

  • Loading branch information...
sebastianbergmann committed Nov 6, 2014
1 parent 6c21c66 commit 247756f342dfb0a319f8985ef06f21a00d98b59c
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/Framework/TestCase.php
@@ -782,6 +782,9 @@ public function runBare()
$this->status = PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED;
$this->statusMessage = $e->getMessage();
} catch (PHPUnit_Framework_AssertionFailedError $e) {
$this->status = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE;
$this->statusMessage = $e->getMessage();
} catch (PredictionException $e) {
$this->status = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE;
$this->statusMessage = $e->getMessage();
} catch (Exception $e) {
@@ -791,6 +794,7 @@ public function runBare()
// Clean up the mock objects.
$this->mockObjects = array();
$this->prophet = null;
// Tear down the fixture. An exception raised in tearDown() will be
// caught and passed on when no exception was raised before.
@@ -855,6 +859,10 @@ public function runBare()
// Workaround for missing "finally".
if (isset($e)) {
if ($e instanceof PredictionException) {
$e = new PHPUnit_Framework_AssertionFailedError($e->getMessage());
}
$this->onNotSuccessfulTest($e);
}
}
@@ -986,7 +994,6 @@ protected function verifyMockObjects()
}
$this->prophet->checkPredictions();
$this->prophet = null;
}
}

0 comments on commit 247756f

Please sign in to comment.