浏览代码

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

Joseph Bielawski 14 年之前
父节点
当前提交
e29e12473c
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/Symfony/Bundle/DoctrineBundle/Tests/Mapping/Driver/AbstractDriverTest.php

+ 4 - 0
src/Symfony/Bundle/DoctrineBundle/Tests/Mapping/Driver/AbstractDriverTest.php

@@ -55,6 +55,10 @@ abstract class AbstractDriverTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        if (!class_exists('Doctrine\\Common\\Version')) {
+            $this->markTestSkipped('Doctrine is not available.');
+        }
+
         $this->dir = sys_get_temp_dir().'/abstract_driver_test';
         @mkdir($this->dir, 0777, true);
     }