diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index ba54da95c..5515e904b 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -294,7 +294,11 @@ abstract class OrmFunctionalTestCase extends OrmTestCase // the actual database platform used during execution has effect on some // metadata mapping behaviors (like the choice of the ID generation). if (is_null(self::$_metadataCacheImpl)) { - self::$_metadataCacheImpl = new \Doctrine\Common\Cache\ArrayCache; + if (isset($GLOBALS['DOCTRINE_CACHE_IMPL'])) { + self::$_metadataCacheImpl = new $GLOBALS['DOCTRINE_CACHE_IMPL']; + } else { + self::$_metadataCacheImpl = new \Doctrine\Common\Cache\ArrayCache; + } } if (is_null(self::$_queryCacheImpl)) {