1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Allow running tests with composer

This commit is contained in:
Lars Strojny 2012-11-17 03:41:32 +01:00
parent 0782b8a682
commit bb3eeffe78

View File

@ -6,11 +6,12 @@ namespace Doctrine\Tests;
error_reporting(E_ALL | E_STRICT);
require_once __DIR__ . '/../../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
if (isset($GLOBALS['DOCTRINE_COMMON_PATH'])) {
require_once $GLOBALS['DOCTRINE_COMMON_PATH'] . '/Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', $GLOBALS['DOCTRINE_COMMON_PATH']);
} else {
require_once __DIR__ . '/../../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', __DIR__ . '/../../../lib/vendor/doctrine-common/lib');
}
$classLoader->register();