mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
11d6f3c0b0
commit
3951b0ac84
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user