From abc60f8ae82477529f470260b62e13347b73ea07 Mon Sep 17 00:00:00 2001 From: sun Date: Sat, 26 Jul 2014 03:05:28 +0200 Subject: [PATCH] Fixed bogus expectation in ExceptionStackTest. Catching a PHPUnit exception and rethrowing it as a non-PHPUnit exception does not make any sense. --- tests/TextUI/exception-stack.phpt | 3 +-- tests/_files/ExceptionStackTest.php | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/TextUI/exception-stack.phpt b/tests/TextUI/exception-stack.phpt index 9d81da414f2..6a078c353fc 100644 --- a/tests/TextUI/exception-stack.phpt +++ b/tests/TextUI/exception-stack.phpt @@ -19,7 +19,7 @@ Time: %s, Memory: %sMb There were 2 errors: 1) ExceptionStackTest::testPrintingChildException -ExceptionStackTestException: Child exception +PHPUnit_Framework_Exception: Child exception message Failed asserting that two arrays are equal. --- Expected @@ -31,7 +31,6 @@ Failed asserting that two arrays are equal. ) -%s:%i %s:%i Caused by diff --git a/tests/_files/ExceptionStackTest.php b/tests/_files/ExceptionStackTest.php index fd86c8cf0e4..cd067b0ba9f 100644 --- a/tests/_files/ExceptionStackTest.php +++ b/tests/_files/ExceptionStackTest.php @@ -1,6 +1,4 @@ assertEquals(array(1), array(2), 'message'); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $message = $e->getMessage() . $e->getComparisonFailure()->getDiff(); - throw new ExceptionStackTestException("Child exception\n$message", 101, $e); + throw new PHPUnit_Framework_Exception("Child exception\n$message", 101, $e); } }