-
-
Notifications
You must be signed in to change notification settings - Fork 73
run tearDown() if TestCase fails with PHP error [closes #254] #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0f84e3f to
016d854
Compare
src/Framework/TestCase.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore handler here to prevent recursion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done ;)
src/Framework/TestCase.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name it as _tearDown() and fix coding style. Double empty line between methods, one empty line after the last one, curly bracket on separated line.
|
What about /** @internal */
public function _errorHandler()
{
restore_error_handler();
@$this->tearDown(); // ignore, error from testMethod() has higher precedence
return $this->previousHandler
? call_user_func_array($this->previousHandler, func_get_args())
: FALSE;
} |
|
@milo thanks for suggestion, I like your _errorHandler alternative :) fixed in my code |
|
Solved by d25b672. |
No description provided.