Skip to content

Commit 8e6c10c

Browse files
Merge [4843].
1 parent 0e4f0ce commit 8e6c10c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

PHPUnit/Framework/TestCase.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ public function runBare()
751751

752752
// Workaround for missing "finally".
753753
if (isset($e)) {
754-
throw $e;
754+
$this->onNotSuccessfulTest($e);
755755
}
756756
}
757757

@@ -1445,6 +1445,17 @@ protected function tearDown()
14451445
{
14461446
}
14471447

1448+
/**
1449+
* This method is called when a test method did not execute successfully.
1450+
*
1451+
* @param Exception $e
1452+
* @since Method available since Release 3.4.0
1453+
*/
1454+
protected function onNotSuccessfulTest(Exception $e)
1455+
{
1456+
throw $e;
1457+
}
1458+
14481459
/**
14491460
* Performs custom preparations on the process isolation template.
14501461
*

0 commit comments

Comments
 (0)