- Re-initialize Config on each start, since it doesn't happen normally

- Better error message for if login fails
This commit is contained in:
nathangray 2017-01-06 10:38:56 -07:00
parent f8b57077fb
commit b439bb2b5c

View File

@ -43,6 +43,11 @@ abstract class AppTest extends TestCase
{
// These globals pulled from the test config (phpunit.xml)
static::load_egw($GLOBALS['EGW_USER'],$GLOBALS['EGW_PASSWORD'], $GLOBALS['EGW_DOMAIN']);
// Re-init config, since it doesn't get handled by loading Egw
Api\Config::init_static();
$GLOBALS['egw']->db->connect();
}
/**
@ -132,7 +137,7 @@ abstract class AppTest extends TestCase
{
if (!($sessionid = $GLOBALS['egw']->session->create($GLOBALS['egw_login_data'])))
{
echo lang("Wrong account or password !!!")."\n\n";
die("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;