3 * This file is loaded by PHPUnit before any test.
7 use PHPUnit\DbUnit\DataSet\YamlDataSet;
8 use PHPUnit\DbUnit\TestCaseTrait;
9 use PHPUnit\Framework\TestCase;
11 require_once __DIR__.'/../boot.php';
12 require_once __DIR__.'/../include/api.php';
14 new App(dirname(__DIR__));
16 \Friendica\Core\Config::set('system', 'url', 'http://localhost');
17 \Friendica\Core\Config::set('system', 'hostname', 'localhost');
18 \Friendica\Core\Config::set('system', 'worker_dont_fork', true);
20 // Backward compatibility
21 if (!class_exists(TestCase::class)) {
22 class_alias(PHPUnit_Framework_TestCase::class, TestCase::class);
24 if (!trait_exists(TestCaseTrait::class)) {
25 class_alias(PHPUnit_Extensions_Database_TestCase_Trait::class, TestCaseTrait::class);
27 if (!class_exists(YamlDataSet::class)) {
28 class_alias(PHPUnit_Extensions_Database_DataSet_YamlDataSet::class, YamlDataSet::class);