瀏覽代碼

Fix for failing tests #1199 when Twig vendor doesn't exists.

Joseph Bielawski 14 年之前
父節點
當前提交
a414e56881
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php

+ 9 - 0
src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php

@@ -22,6 +22,15 @@ class WebTestCase extends BaseWebTestCase
         self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
     }
 
+    protected function setUp()
+    {
+        if (!class_exists('Twig_Environment')) {
+            $this->markTestSkipped('Twig is not available.');
+        }
+
+        parent::setUp();
+    }
+
     protected function deleteTmpDir($testCase)
     {
         if (!file_exists($dir = sys_get_temp_dir().'/'.$testCase)) {