浏览代码

mark test as skip if JMS Translator does not exist

Thomas Rabaix 11 年之前
父节点
当前提交
8537ea5269
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Tests/Translator/Extractor/JMSTranslatorBundle/AdminExtractorTest.php

+ 4 - 0
Tests/Translator/Extractor/JMSTranslatorBundle/AdminExtractorTest.php

@@ -38,6 +38,10 @@ class AdminExtractorTest extends \PHPUnit_Framework_TestCase
 
     public function setUp()
     {
+        if (!interface_exists('JMS\TranslationBundle\Translation\ExtractorInterface')) {
+            $this->markTestSkipped('JMS Translator Bundle does not exist');
+        }
+        
         $this->fooAdmin = $this->getMock('Sonata\AdminBundle\Admin\AdminInterface');
         $this->barAdmin = $this->getMock('Sonata\AdminBundle\Admin\AdminInterface');