BUG Fixing logout issues with steps

stepIAmNotLoggedIn() would previously just kill the test
session, but this has the side effect of losing the current testsession
temporary database, so this causes steps of logging out to fail the
rest of the steps in a scenario.

See https://github.com/silverstripe-labs/silverstripe-behat-extension/pull/12
This commit is contained in:
Sean Harvey 2013-11-29 00:49:36 +01:00 committed by Ingo Schommer
parent 0a9505e8b2
commit 8141ced2fd

View File

@ -110,7 +110,8 @@ class LoginContext extends BehatContext
*/
public function stepIAmNotLoggedIn()
{
$this->getSession()->reset();
$c = $this->getMainContext();
$this->getSession()->visit($c->joinUrlParts($c->getBaseUrl(), 'Security/logout'));
}
/**