From bb3eeffe78274ffd0cb2dac0924a896dbef85abe Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Sat, 17 Nov 2012 03:41:32 +0100 Subject: [PATCH] Allow running tests with composer --- tests/Doctrine/Tests/TestInit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/TestInit.php b/tests/Doctrine/Tests/TestInit.php index 3a35c2104..8914a8c2b 100644 --- a/tests/Doctrine/Tests/TestInit.php +++ b/tests/Doctrine/Tests/TestInit.php @@ -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();