BUGFIX: If a FunctionalTest fails in the middle of a get() or post() call, return an error other than the controller stack failing.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78413 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-06-04 06:46:30 +00:00
parent 11d6f3c0b0
commit 3951b0ac84

View File

@ -29,6 +29,10 @@ class TestSession {
}
function __destruct() {
// Shift off anything else that's on the stack. This can happen if something throws
// an exception that causes a premature TestSession::__destruct() call
while(Controller::curr() != $this->controller) Controller::curr()->popCurrent();
$this->controller->popCurrent();
}