From a941fc1bd42eeb9510cf6ffefd66a0b8db05927c Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 10 Oct 2018 07:14:17 +0200 Subject: [PATCH] Revert "drop support of setting msg/code in expectedExceptation annotation" This reverts commit d173bf1e22e8be1b69c87eb03f301ed0feb3486e. --- tests/_files/ExceptionTest.php | 7 +++++++ tests/unit/Util/TestTest.php | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/tests/_files/ExceptionTest.php b/tests/_files/ExceptionTest.php index 03fc8f6d225..af6895793fd 100644 --- a/tests/_files/ExceptionTest.php +++ b/tests/_files/ExceptionTest.php @@ -52,6 +52,13 @@ public function testFour() { } + /** + * @expectedException Class Message 1234 + */ + public function testFive() + { + } + /** * @expectedException Class * @expectedExceptionMessage Message diff --git a/tests/unit/Util/TestTest.php b/tests/unit/Util/TestTest.php index 7848fef2279..d2f5f44da59 100644 --- a/tests/unit/Util/TestTest.php +++ b/tests/unit/Util/TestTest.php @@ -43,6 +43,11 @@ public function testGetExpectedException() Test::getExpectedException(\ExceptionTest::class, 'testFour') ); + $this->assertArraySubset( + ['class' => 'Class', 'code' => 1234, 'message' => 'Message'], + Test::getExpectedException(\ExceptionTest::class, 'testFive') + ); + $this->assertArraySubset( ['class' => 'Class', 'code' => 1234, 'message' => 'Message'], Test::getExpectedException(\ExceptionTest::class, 'testSix')