$node =
new FormThemeNode($form,
$resources, 0
);
$environment =
new Environment($this->
createMock(LoaderInterface::
class));
$formRenderer =
new FormRenderer($this->
createMock(FormRendererEngineInterface::
class));
$this->
registerTwigRuntimeLoader($environment,
$formRenderer);
$compiler =
new Compiler($environment);
$this->
assertEquals( sprintf( '$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [1 => "tpl1", 0 => "tpl2"], true);',
$this->
getVariableGetter('form'
) ),
trim($compiler->
compile($node)->
getSource()) );
$node =
new FormThemeNode($form,
$resources, 0, null, true
);
$this->
assertEquals( sprintf( '$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [1 => "tpl1", 0 => "tpl2"], false);',
$this->
getVariableGetter('form'
) ),