diff --git a/test/lib/init.php b/test/lib/init.php index 5aaf6c2d42..4d610614da 100644 --- a/test/lib/init.php +++ b/test/lib/init.php @@ -62,10 +62,10 @@ include $testPath . 'config/config.php'; include $testPath. 'lib/db.class.php'; include $testPath. 'lib/rest.php'; $db = new db(); -if($config->test->base) $rest = new rest($config->test->base); -if(!empty($config->test->account) and !empty($config->test->password)) +if(!empty($config->test->account) and !empty($config->test->password) and !empty($config->test->base)) { + $rest = new rest($config->test->base); $token = $rest->post('/tokens', array('account' => $config->test->account, 'password' => $config->test->password)); $token = $token->body; }