X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fbootstrap.php;h=9f7c1c3f9195f0df55ee744b0f3c6144e85600d1;hb=858151807f5398c67d38ab3e50ddfd6e6b808810;hp=4bc3e932f0118529faae6ca0d3560985603d2ccf;hpb=66a103e36a42ab251fd9ca6c4b56b54380e4d535;p=friendica.git diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 4bc3e932f0..9f7c1c3f91 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,29 +1,34 @@ . + * * 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; -require_once __DIR__.'/../boot.php'; -require_once __DIR__.'/../include/api.php'; - -new App(dirname(__DIR__)); +if (!file_exists(__DIR__ . '/../vendor/autoload.php')) { + die('Vendor path not found. Please execute "bin/composer.phar --no-dev install" on the command line in the web root.'); +} -\Friendica\Core\Config::set('system', 'url', 'http://localhost'); -\Friendica\Core\Config::set('system', 'hostname', 'localhost'); -\Friendica\Core\Config::set('system', 'worker_dont_fork', true); +require __DIR__ . '/../vendor/autoload.php'; // Backward compatibility if (!class_exists(TestCase::class)) { - class_alias(PHPUnit_Framework_TestCase::class, TestCase::class); -} -if (!trait_exists(TestCaseTrait::class)) { - class_alias(PHPUnit_Extensions_Database_TestCase_Trait::class, TestCaseTrait::class); -} -if (!class_exists(YamlDataSet::class)) { - class_alias(PHPUnit_Extensions_Database_DataSet_YamlDataSet::class, YamlDataSet::class); + class_alias(\PHPUnit\Framework\TestCase::class, TestCase::class); }