123456789101112131415 |
- <?php
- // if the bundle is within a symfony project, try to reuse the project's autoload
- $autoload = __DIR__.'/../../../../../../app/autoload.php';
- // if the bundle is the project, try to use the composer's autoload for the tests
- $composerAutoload = __DIR__.'/../../vendor/autoload.php';
- if (is_file($autoload)) {
- include $autoload;
- } elseif (is_file($composerAutoload)) {
- include $composerAutoload;
- } else {
- throw new \Exception('unable to autoload vendors for tests');
- }
|