From 1f44c091efc32e8957ab71ebd3eaf3595a0d800b Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 10 Dec 2015 17:14:09 +0100 Subject: [PATCH] Closes #1959 --- ChangeLog-5.1.md | 7 +++++++ src/Framework/TestCase.php | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog-5.1.md b/ChangeLog-5.1.md index 002b0678147..fefb9f424f1 100644 --- a/ChangeLog-5.1.md +++ b/ChangeLog-5.1.md @@ -2,6 +2,12 @@ All notable changes of the PHPUnit 5.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [5.1.4] - 2015-12-DD + +* Fixed [#1959](https://github.com/sebastianbergmann/phpunit/issues/1959): Prophecy errors are not handled correctly + +### Fixed + ## [5.1.3] - 2015-12-10 ### Added @@ -30,6 +36,7 @@ All notable changes of the PHPUnit 5.1 release series are documented in this fil * Merged [#1871](https://github.com/sebastianbergmann/phpunit/issues/1871): Added support for `@testdox` annotations on classes * Merged [#1917](https://github.com/sebastianbergmann/phpunit/issues/1917): Allow `@coversDefaultClass` annotation to work on traits +[5.1.4]: https://github.com/sebastianbergmann/phpunit/compare/5.1.3...5.1.4 [5.1.3]: https://github.com/sebastianbergmann/phpunit/compare/5.1.2...5.1.3 [5.1.2]: https://github.com/sebastianbergmann/phpunit/compare/5.1.1...5.1.2 [5.1.1]: https://github.com/sebastianbergmann/phpunit/compare/5.1.0...5.1.1 diff --git a/src/Framework/TestCase.php b/src/Framework/TestCase.php index d5655666115..f392328491d 100644 --- a/src/Framework/TestCase.php +++ b/src/Framework/TestCase.php @@ -1009,7 +1009,7 @@ protected function verifyMockObjects() $this->prophet->checkPredictions(); } catch (Throwable $t) { /* Intentionally left empty */ - } catch (Exception $e) { + } catch (Exception $t) { /* Intentionally left empty */ } @@ -1021,8 +1021,8 @@ protected function verifyMockObjects() } } - if (isset($e)) { - throw $e; + if (isset($t)) { + throw $t; } } }