]> git.mxchange.org Git - friendica.git/blobdiff - tests/bootstrap.php
Fixes: (#5447)
[friendica.git] / tests / bootstrap.php
index 4474e4ee8ec55cc624eebe0de62905e6702f7185..4bc3e932f0118529faae6ca0d3560985603d2ccf 100644 (file)
@@ -3,6 +3,7 @@
  * This file is loaded by PHPUnit before any test.
  */
 
+use Friendica\App;
 use PHPUnit\DbUnit\DataSet\YamlDataSet;
 use PHPUnit\DbUnit\TestCaseTrait;
 use PHPUnit\Framework\TestCase;
@@ -10,6 +11,12 @@ use PHPUnit\Framework\TestCase;
 require_once __DIR__.'/../boot.php';
 require_once __DIR__.'/../include/api.php';
 
+new App(dirname(__DIR__));
+
+\Friendica\Core\Config::set('system', 'url', 'http://localhost');
+\Friendica\Core\Config::set('system', 'hostname', 'localhost');
+\Friendica\Core\Config::set('system', 'worker_dont_fork', true);
+
 // Backward compatibility
 if (!class_exists(TestCase::class)) {
        class_alias(PHPUnit_Framework_TestCase::class, TestCase::class);