mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 08:17:22 +01:00
Merge pull request #1129 from tomb1n0/bugfix/alwaysCallTeardownRegardlessOfExceptions
[Bug] Always call parent teardown even if an exception is thrown
This commit is contained in:
@ -234,11 +234,13 @@ trait Testable
|
||||
$afterEach = ChainableClosure::bound($this->__afterEach, $afterEach);
|
||||
}
|
||||
|
||||
$this->__callClosure($afterEach, func_get_args());
|
||||
try {
|
||||
$this->__callClosure($afterEach, func_get_args());
|
||||
} finally {
|
||||
parent::tearDown();
|
||||
|
||||
parent::tearDown();
|
||||
|
||||
TestSuite::getInstance()->test = null;
|
||||
TestSuite::getInstance()->test = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user