mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Fix logged in tests when session ID is not created (CLI)
This commit is contained in:
parent
bb16d47c7c
commit
a0e131d395
@ -203,7 +203,12 @@ abstract class LoggedInTest extends TestCase
|
||||
{
|
||||
if (!($sessionid = $GLOBALS['egw']->session->create($GLOBALS['egw_login_data'])))
|
||||
{
|
||||
die("Wrong account or password - run tests with 'phpunit -c doc/phpunit.xml' or 'phpunit <test_dir> -c doc/phpunit.xml'\n\n");
|
||||
if(!($reason = $GLOBALS['egw']->session->reason) && $GLOBALS['egw']->session->account_id)
|
||||
{
|
||||
$GLOBALS['egw']->session->sessionid = 'CLI';
|
||||
return 'CLI';
|
||||
}
|
||||
die($reason ? $reason : "Wrong account or password - run tests with 'phpunit -c doc/phpunit.xml' or 'phpunit <test_dir> -c doc/phpunit.xml'\n\n");
|
||||
}
|
||||
unset($GLOBALS['egw_login_data']);
|
||||
return $sessionid;
|
||||
|
Loading…
Reference in New Issue
Block a user