TestInit.php 510 B

1234567891011121314151617181920212223
  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. {
  10. if (0 === strpos($class, 'Doctrine\Tests\\')) {
  11. $path = __DIR__.'/../../'.strtr($class, '\\', '/').'.php';
  12. if (is_file($path) && is_readable($path)) {
  13. require_once $path;
  14. return true;
  15. }
  16. }
  17. });
  18. require_once __DIR__ . "/../../../vendor/autoload.php";