X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fbootstrap.php;h=9f7c1c3f9195f0df55ee744b0f3c6144e85600d1;hb=858151807f5398c67d38ab3e50ddfd6e6b808810;hp=8b4b8ade1ebb473c0ff3ffe62f12fc55ee0de3c0;hpb=c1dbb256561ecdb19fe0541628b1ec0f06d95dfa;p=friendica.git diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8b4b8ade1e..9f7c1c3f91 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,18 +1,34 @@ . + * * This file is loaded by PHPUnit before any test. */ -use Dice\Dice; -use Friendica\DI; use PHPUnit\Framework\TestCase; -// Backward compatibility -if (!class_exists(TestCase::class)) { - class_alias(PHPUnit_Framework_TestCase::class, TestCase::class); +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.'); } -$dice = new Dice(); -$dice = $dice->addRules(include __DIR__ . '/../static/dependencies.config.php'); +require __DIR__ . '/../vendor/autoload.php'; -DI::init($dice); +// Backward compatibility +if (!class_exists(TestCase::class)) { + class_alias(\PHPUnit\Framework\TestCase::class, TestCase::class); +}