浏览代码

Behave like the parent method (#4419)

This LSP violation caused the build to fail. This change makes the test
forward-compatible with the next major version of the twig bridge.
Grégoire Paris 8 年之前
父节点
当前提交
8594d0e0f3
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      Tests/Form/Widget/BaseWidgetTest.php

+ 5 - 4
Tests/Form/Widget/BaseWidgetTest.php

@@ -64,15 +64,16 @@ abstract class BaseWidgetTest extends AbstractWidgetTestCase
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
-    protected function getRenderingEngine()
+    protected function getRenderingEngine(\Twig_Environment $environment = null)
     {
     {
         if (!in_array($this->type, array('form', 'filter'))) {
         if (!in_array($this->type, array('form', 'filter'))) {
             throw new \Exception('Please override $this->type in your test class specifying template to use (either form or filter)');
             throw new \Exception('Please override $this->type in your test class specifying template to use (either form or filter)');
         }
         }
 
 
-        return new TwigRendererEngine(array(
-            $this->type.'_admin_fields.html.twig',
-        ));
+        return new TwigRendererEngine(
+            array($this->type.'_admin_fields.html.twig'),
+            $environment
+        );
     }
     }
 
 
     /**
     /**