Skip to content

Commit

Permalink
fix autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 committed Mar 1, 2024
1 parent b6ba039 commit aba2f59
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
use Pimcore\Tests\Support\Util\Autoloader;


if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
include __DIR__ . '/../vendor/autoload.php';
if (file_exists(__DIR__ . '/../vendor/autoload_runtime.php')) {
include __DIR__ . '/../vendor/autoload_runtime.php';
$pimcoreTestDir = __DIR__ . '/../vendor/pimcore/pimcore/tests';
} elseif (file_exists(__DIR__ . '/../../../../vendor/autoload.php')) {
include __DIR__ . '/../../../../vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/../../../../vendor/autoload_runtime.php')) {
include __DIR__ . '/../../../../vendor/autoload_runtime.php';
$pimcoreTestDir = __DIR__ . '/../../../../vendor/pimcore/pimcore/tests';
} elseif (getenv('PIMCORE_PROJECT_ROOT') != '' && file_exists(getenv('PIMCORE_PROJECT_ROOT') . '/vendor/autoload.php')) {
include getenv('PIMCORE_PROJECT_ROOT') . '/vendor/autoload.php';
} elseif (getenv('PIMCORE_PROJECT_ROOT') != '' && file_exists(getenv('PIMCORE_PROJECT_ROOT') . '/vendor/autoload_runtime.php')) {
include getenv('PIMCORE_PROJECT_ROOT') . '/vendor/autoload_runtime.php';
$pimcoreTestDir = getenv('PIMCORE_PROJECT_ROOT') . '/vendor/pimcore/pimcore/tests';
} elseif (getenv('PIMCORE_PROJECT_ROOT') != '') {
throw new \Exception('Invalid Pimcore project root "' . getenv('PIMCORE_PROJECT_ROOT') . '"');
Expand Down

0 comments on commit aba2f59

Please sign in to comment.