Browse files

Merge pull request #516 from lstrojny/bug/phpunit-composer

Allow running tests with composer
  • Loading branch information...
2 parents 2a69d2d + bb3eeff commit 3666d1485a8b4053bf93667e3881e4534297cf91 @beberlei beberlei committed Nov 17, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 tests/Doctrine/Tests/TestInit.php
View
3 tests/Doctrine/Tests/TestInit.php
@@ -6,11 +6,12 @@
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();

0 comments on commit 3666d14

Please sign in to comment.