TestInit.php 509 B

123456789101112131415161718192021
  1. <?php
  2. /*
  3. * This file bootstraps the test environment.
  4. */
  5. namespace Doctrine\Tests;
  6. error_reporting(E_ALL | E_STRICT);
  7. // register silently failing autoloader
  8. spl_autoload_register(function($class) {
  9. if (0 === strpos($class, 'Doctrine\Tests\\')) {
  10. $path = __DIR__.'/../../'.strtr($class, '\\', '/').'.php';
  11. if (is_file($path) && is_readable($path)) {
  12. require_once $path;
  13. return true;
  14. }
  15. }
  16. });
  17. require_once __DIR__ . "/../../../vendor/autoload.php";