mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Always call parent teardown even if an exception is thrown
This commit is contained in:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user