浏览代码

[Tests] Skip test if Doctrine Common is not available.

Joseph Bielawski 14 年之前
父节点
当前提交
46e58206a3

+ 4 - 0
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

@@ -170,6 +170,10 @@ abstract class FrameworkExtensionTest extends TestCase
 
     public function testAnnotations()
     {
+        if (!class_exists('Doctrine\\Common\\Version')) {
+            $this->markTestSkipped('Doctrine is not available.');
+        }
+
         $container = $this->createContainerFromFile('full');
 
         $this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.file_cache_reader')->getArgument(1));