Always call parent teardown even if an exception is thrown

This commit is contained in:
Tom Harper
2024-04-08 10:03:55 +01:00
parent a7a3e4240e
commit adb2fb51df

View File

@ -234,12 +234,14 @@ trait Testable
$afterEach = ChainableClosure::bound($this->__afterEach, $afterEach);
}
try {
$this->__callClosure($afterEach, func_get_args());
} finally {
parent::tearDown();
TestSuite::getInstance()->test = null;
}
}
/**
* Executes the Test Case current test.