Skip to content

Commit 6fe1359

Browse files
committed
[PHPUnitBridge] PHP 5.3 compatibility
1 parent 6759543 commit 6fe1359

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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)