From b439bb2b5c52726594e877dffde417bc345964df Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 6 Jan 2017 10:38:56 -0700 Subject: [PATCH] - Re-initialize Config on each start, since it doesn't happen normally - Better error message for if login fails --- api/src/test/AppTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/src/test/AppTest.php b/api/src/test/AppTest.php index e9b521d741..ac3be20ad7 100644 --- a/api/src/test/AppTest.php +++ b/api/src/test/AppTest.php @@ -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 -c doc/phpunit.xml'\n\n"); } unset($GLOBALS['egw_login_data']); return $sessionid;