fixed behat test failure between two scenarios if not logged out

This commit is contained in:
Jeffrey Guo 2014-05-02 17:35:50 +12:00
parent 29d99e884f
commit 53acf56c00

View File

@ -139,6 +139,7 @@ class LoginContext extends BehatContext
// If no login form, go to /security/login page
if(!$visibleForm) {
$c = $this->getMainContext();
$this->getSession()->visit($c->joinUrlParts($c->getBaseUrl(), 'Security/logout'));
$loginUrl = $c->joinUrlParts($c->getBaseUrl(), $c->getLoginUrl());
$this->getSession()->visit($loginUrl);
$page = $this->getSession()->getPage();