Skip to content

Commit 57213a1

Browse files
minor symfony#19068 [PHPUnitBridge] PHP 5.3 compatibility (xabbuh)
This PR was merged into the 3.2-dev branch. Discussion ---------- [PHPUnitBridge] PHP 5.3 compatibility | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- e65ec65 [PHPUnitBridge] PHP 5.3 compatibility
2 parents 3a3801a + e65ec65 commit 57213a1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Symfony/Bridge/PhpUnit/ErrorAssert.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,14 @@ public static function assertErrorsAreTriggered($expectedType, $expectedMessages
5353
});
5454

5555
$testCode();
56-
} finally {
57-
restore_error_handler();
56+
} catch (\Exception $e) {
57+
} catch (\Throwable $e) {
58+
}
59+
60+
restore_error_handler();
61+
62+
if (isset($e)) {
63+
throw $e;
5864
}
5965

6066
\PHPUnit_Framework_Assert::assertCount(count($expectedMessages), $triggeredMessages);

0 commit comments

Comments
 (0)