2008-02-09 02:20:35 +03:00
|
|
|
<?php
|
2009-01-04 19:15:32 +03:00
|
|
|
/*
|
|
|
|
* This file bootstraps the test environment.
|
|
|
|
*/
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\Tests;
|
2009-01-04 19:15:32 +03:00
|
|
|
|
2009-07-18 17:15:54 +04:00
|
|
|
error_reporting(E_ALL | E_STRICT);
|
|
|
|
|
2010-05-25 19:42:09 +04:00
|
|
|
require_once __DIR__ . '/../../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
|
|
|
|
|
2010-06-07 00:41:05 +04:00
|
|
|
if (isset($GLOBALS['DOCTRINE_COMMON_PATH'])) {
|
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', $GLOBALS['DOCTRINE_COMMON_PATH']);
|
|
|
|
} else {
|
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', __DIR__ . '/../../../lib/vendor/doctrine-common/lib');
|
|
|
|
}
|
2010-05-25 19:42:09 +04:00
|
|
|
$classLoader->register();
|
|
|
|
|
2010-06-07 00:41:05 +04:00
|
|
|
if (isset($GLOBALS['DOCTRINE_DBAL_PATH'])) {
|
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', $GLOBALS['DOCTRINE_DBAL_PATH']);
|
|
|
|
} else {
|
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', __DIR__ . '/../../../lib/vendor/doctrine-dbal/lib');
|
|
|
|
}
|
2010-05-25 19:42:09 +04:00
|
|
|
$classLoader->register();
|
2008-09-12 10:09:16 +04:00
|
|
|
|
2011-06-19 00:47:21 +04:00
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\ORM', __DIR__ . '/../../../lib');
|
|
|
|
$classLoader->register();
|
|
|
|
|
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Tests', __DIR__ . '/../../');
|
2009-09-11 23:50:48 +04:00
|
|
|
$classLoader->register();
|
2008-09-13 16:40:17 +04:00
|
|
|
|
2010-04-09 17:40:42 +04:00
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . "/../../../lib/vendor");
|
|
|
|
$classLoader->register();
|
|
|
|
|
2010-04-07 22:35:33 +04:00
|
|
|
if (!file_exists(__DIR__."/Proxies")) {
|
|
|
|
if (!mkdir(__DIR__."/Proxies")) {
|
|
|
|
throw new Exception("Could not create " . __DIR__."/Proxies Folder.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!file_exists(__DIR__."/ORM/Proxy/generated")) {
|
|
|
|
if (!mkdir(__DIR__."/ORM/Proxy/generated")) {
|
|
|
|
throw new Exception("Could not create " . __DIR__."/ORM/Proxy/generated Folder.");
|
|
|
|
}
|
|
|
|
}
|