|
@@ 82-89 (lines=8) @@
|
| 79 |
|
} |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
private function setUpVersion2() |
| 83 |
|
{ |
| 84 |
|
$csrfProvider = $this->getMockBuilder('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface')->getMock(); |
| 85 |
|
$this->renderer = new TwigRenderer($this->rendererEngine, $csrfProvider); |
| 86 |
|
$this->environment->addExtension($extension = new FormExtension($this->renderer)); |
| 87 |
|
$extension->initRuntime($this->environment); |
| 88 |
|
$this->registerTwigRuntimeLoader($this->environment, $this->renderer); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
private function setUpVersion3Plus() |
| 92 |
|
{ |
|
@@ 91-98 (lines=8) @@
|
| 88 |
|
$this->registerTwigRuntimeLoader($this->environment, $this->renderer); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
private function setUpVersion3Plus() |
| 92 |
|
{ |
| 93 |
|
$csrfProvider = $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock(); |
| 94 |
|
$this->renderer = new FormRenderer($this->rendererEngine, $csrfProvider); |
| 95 |
|
$this->environment->addExtension($extension = new FormExtension()); |
| 96 |
|
$extension->initRuntime($this->environment); |
| 97 |
|
$this->registerTwigRuntimeLoader($this->environment, $this->renderer); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
protected function registerTwigRuntimeLoader(\Twig_Environment $environment, $renderer) |
| 101 |
|
{ |