Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / common / tests / Doctrine / Tests / TestInit.php
1 <?php
2 /*
3  * This file bootstraps the test environment.
4  */
5 namespace Doctrine\Tests;
6
7 error_reporting(E_ALL | E_STRICT);
8
9 // register silently failing autoloader
10 spl_autoload_register(function($class)
11 {
12     if (0 === strpos($class, 'Doctrine\Tests\\')) {
13         $path = __DIR__.'/../../'.strtr($class, '\\', '/').'.php';
14         if (file_exists($path) && is_readable($path)) {
15             require_once $path;
16
17             return true;
18         }
19     } else if (0 === strpos($class, 'Doctrine\Common\\')) {
20         $path = __DIR__.'/../../../lib/'.($class = strtr($class, '\\', '/')).'.php';
21         if (file_exists($path) && is_readable($path)) {
22             require_once $path;
23
24             return true;
25         }
26     }
27 });
28
29 \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace(
30     'Doctrine\Tests\Common\Annotations\Fixtures', __DIR__ . '/../../'
31 );