diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/testcase.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php index f4bb8479559..d532a3b01c0 100644 --- a/tests/lib/testcase.php +++ b/tests/lib/testcase.php @@ -40,6 +40,14 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { }); } + protected function tearDown() { + $hookExceptions = \OC_Hook::$thrownExceptions; + \OC_Hook::$thrownExceptions = []; + if(!empty($hookExceptions)) { + throw $hookExceptions[0]; + } + } + /** * Returns a unique identifier as uniqid() is not reliable sometimes * |