Fix Testing

This commit is contained in:
Philipp Holzer 2018-10-22 20:59:51 +02:00
parent cbb9a2e8b7
commit 4a82708cbf
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
4 changed files with 22 additions and 26 deletions

View file

@ -12,6 +12,8 @@ use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Network\HTTPException;
require_once __DIR__.'/../include/api.php';
/**
* Tests for the API functions.
*
@ -20,7 +22,6 @@ use Friendica\Network\HTTPException;
*/
class ApiTest extends DatabaseTest
{
/**
* Create variables used by tests.
*/
@ -28,7 +29,7 @@ class ApiTest extends DatabaseTest
{
parent::setUp();
require_once __DIR__.'/../include/api.php';
$this->app = BaseObject::getApp();
// User data that the test database is populated with
$this->selfUser = [
@ -60,6 +61,10 @@ class ApiTest extends DatabaseTest
'uid' => $this->selfUser['id']
];
Config::set('system', 'url', 'http://localhost');
Config::set('system', 'hostname', 'localhost');
Config::set('system', 'worker_dont_fork', true);
// Default config
Config::set('config', 'hostname', 'localhost');
Config::set('system', 'throttle_limit_day', 100);