Skip to content

Commit

Permalink
Behave like the parent method (sonata-project#4419)
Browse files Browse the repository at this point in the history
This LSP violation caused the build to fail. This change makes the test
forward-compatible with the next major version of the twig bridge.
  • Loading branch information
greg0ire authored and jordisala1991 committed Mar 24, 2017
1 parent 283e3ef commit 8594d0e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Tests/Form/Widget/BaseWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ protected function getEnvironment()
/**
* {@inheritdoc}
*/
protected function getRenderingEngine()
protected function getRenderingEngine(\Twig_Environment $environment = null)
{
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)');
}

return new TwigRendererEngine(array(
$this->type.'_admin_fields.html.twig',
));
return new TwigRendererEngine(
array($this->type.'_admin_fields.html.twig'),
$environment
);
}

/**
Expand Down

0 comments on commit 8594d0e

Please sign in to comment.