Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / 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 require_once __DIR__ . '/../../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
10
11 if (isset($GLOBALS['DOCTRINE_COMMON_PATH'])) {
12     $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', $GLOBALS['DOCTRINE_COMMON_PATH']);
13 } else {
14     $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', __DIR__ . '/../../../lib/vendor/doctrine-common/lib');
15 }
16 $classLoader->register();
17
18 if (isset($GLOBALS['DOCTRINE_DBAL_PATH'])) {
19     $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', $GLOBALS['DOCTRINE_DBAL_PATH']);
20 } else {
21     $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', __DIR__ . '/../../../lib/vendor/doctrine-dbal/lib');
22 }
23 $classLoader->register();
24
25 $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\ORM', __DIR__ . '/../../../lib');
26 $classLoader->register();
27
28 $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Tests', __DIR__ . '/../../');
29 $classLoader->register();
30
31 $classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . "/../../../lib/vendor");
32 $classLoader->register();
33
34 if (!file_exists(__DIR__."/Proxies")) {
35     if (!mkdir(__DIR__."/Proxies")) {
36         throw new Exception("Could not create " . __DIR__."/Proxies Folder.");
37     }
38 }
39 if (!file_exists(__DIR__."/ORM/Proxy/generated")) {
40     if (!mkdir(__DIR__."/ORM/Proxy/generated")) {
41         throw new Exception("Could not create " . __DIR__."/ORM/Proxy/generated Folder.");
42     }
43 }