diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php index 7e6e200d9..94936a125 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php @@ -15,7 +15,7 @@ class DDC742Test extends \Doctrine\Tests\OrmFunctionalTestCase { parent::setUp(); - if (\extension_loaded('memcache')) { + if (\extension_loaded('memcache') && @fsockopen('localhost', 11211)) { $memcache = new \Memcache(); $memcache->addServer('localhost'); $memcache->flush(); @@ -26,6 +26,8 @@ class DDC742Test extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->getMetadataFactory()->setCacheDriver($cacheDriver); } else if (\extension_loaded('apc')) { $this->_em->getMetadataFactory()->setCacheDriver(new \Doctrine\Common\Cache\ApcCache()); + } else { + $this->markTestSkipped('Test only works with a cache enabled.'); } try {