From 54807065cce41f11aa31ff824f988cddc5112152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 6 Dec 2016 00:08:01 +0100 Subject: [PATCH] Fix build --- Tests/Controller/HelperControllerTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/Controller/HelperControllerTest.php b/Tests/Controller/HelperControllerTest.php index 6a22640649..66fd097946 100644 --- a/Tests/Controller/HelperControllerTest.php +++ b/Tests/Controller/HelperControllerTest.php @@ -423,6 +423,18 @@ public function testRetrieveFormFieldElementAction($validatorInterface) $twig = new \Twig_Environment($this->getMock('\Twig_LoaderInterface')); $twig->addExtension(new FormExtension($mockRenderer)); + if (Kernel::MAJOR_VERSION >= 3 && Kernel::MINOR_VERSION >= 2) { + $runtimeLoader = $this + ->getMockBuilder('Twig_RuntimeLoaderInterface') + ->getMock(); + + $runtimeLoader->expects($this->once()) + ->method('load') + ->with($this->equalTo('Symfony\Bridge\Twig\Form\TwigRenderer')) + ->will($this->returnValue($mockRenderer)); + + $twig->addRuntimeLoader($runtimeLoader); + } $request = new Request(array( 'code' => 'sonata.post.admin', 'objectId' => 42,