Commit c035baed authored by Jeremy Mikola's avatar Jeremy Mikola

Create test bootstrap for autoloading

parent 86dab095
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
convertWarningsToExceptions="true" convertWarningsToExceptions="true"
stopOnFailure="false" stopOnFailure="false"
syntaxCheck="false" syntaxCheck="false"
bootstrap="vendor/autoload.php" bootstrap="tests/bootstrap.php"
> >
<php> <php>
......
<?php
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
// Dependencies were installed with Composer and this is the main project
$loader = require_once __DIR__ . '/../vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/../../../../autoload.php')) {
// We're installed as a dependency in another project's `vendor` directory
$loader = require_once __DIR__ . '/../../../../autoload.php';
} else {
throw new Exception('Can\'t find autoload.php. Did you install dependencies with Composer?');
}
$loader->addPsr4('MongoDB\\Tests\\', __DIR__);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment