Skip to content

Commit

Permalink
Merge pull request sonata-project#1 from greg0ire/Koc-fix-symfony-com…
Browse files Browse the repository at this point in the history
…patibility

Fix build
  • Loading branch information
Koc authored Dec 6, 2016
2 parents 513116b + 5480706 commit c3d0255
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/Controller/HelperControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c3d0255

Please sign in to comment.