Skip to content

Conversation

@richard-ejem
Copy link
Contributor

No description provided.

@richard-ejem richard-ejem force-pushed the teardown branch 2 times, most recently from 0f84e3f to 016d854 Compare September 18, 2015 21:21
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done ;)

Copy link
Member

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.

@milo
Copy link
Member

milo commented Oct 3, 2015

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 added a commit to milo/tester that referenced this pull request Oct 9, 2015
milo added a commit to milo/tester that referenced this pull request Oct 9, 2015
milo added a commit to milo/tester that referenced this pull request Oct 9, 2015
@richard-ejem
Copy link
Contributor Author

@milo thanks for suggestion, I like your _errorHandler alternative :) fixed in my code

@milo
Copy link
Member

milo commented Oct 13, 2015

Solved by d25b672.

@milo milo closed this Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants