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
|
|
|
|
2009-12-16 00:06:32 +03:00
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
|
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.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-09-13 16:40:17 +04:00
|
|
|
set_include_path(
|
2009-09-19 16:10:59 +04:00
|
|
|
__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib'
|
|
|
|
. PATH_SEPARATOR .
|
|
|
|
get_include_path()
|
2010-03-17 02:03:29 +03:00
|
|
|
);
|