autoload.php.dist 486 B

123456789101112131415
  1. <?php
  2. // if the bundle is within a symfony project, try to reuse the project's autoload
  3. $autoload = __DIR__.'/../../../../../../app/autoload.php';
  4. // if the bundle is the project, try to use the composer's autoload for the tests
  5. $composerAutoload = __DIR__.'/../../vendor/autoload.php';
  6. if (is_file($autoload)) {
  7. include $autoload;
  8. } elseif (is_file($composerAutoload)) {
  9. include $composerAutoload;
  10. } else {
  11. throw new \Exception('unable to autoload vendors for tests');
  12. }