From 4064389eb37f207ef138ea7a42bec82e590116bb Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 6 Mar 2021 09:33:22 -0800 Subject: [PATCH] Restore e107_config.php on test failure. --- e107_tests/tests/_support/Helper/E107Base.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/e107_tests/tests/_support/Helper/E107Base.php b/e107_tests/tests/_support/Helper/E107Base.php index 5af690d68..2b52abd14 100644 --- a/e107_tests/tests/_support/Helper/E107Base.php +++ b/e107_tests/tests/_support/Helper/E107Base.php @@ -67,6 +67,17 @@ abstract class E107Base extends Base $this->workaroundOldPhpUnitPhpCodeCoverage(); } + public function _failed($test, $fail) + { + parent::_failed($test, $fail); + $this->revokeLocalE107Config(); + $this->preparer->rollback(); + $this->restoreLocalE107Config(); + $this->workaroundOldPhpUnitPhpCodeCoverage(); + + } + + protected function revokeLocalE107Config() { if (file_exists(self::APP_PATH_E107_CONFIG))