__DIR__.'/../../Resources/views/Form',
__DIR__.'/Fixtures/templates/form',
]);
$environment =
new Environment($loader,
['strict_variables' => true
]);
$environment->
addExtension(new TranslationExtension(new StubTranslator()));
$environment->
addGlobal('global', ''
);
// the value can be any template that exists
$environment->
addGlobal('dynamic_template_name', 'child_label'
);
$environment->
addExtension(new FormExtension());
$rendererEngine =
new TwigRendererEngine([ 'form_div_layout.html.twig',
'custom_widgets.html.twig',
],
$environment);
$this->renderer =
new FormRenderer($rendererEngine,
$this->
createMock(CsrfTokenManagerInterface::
class));
$this->
registerTwigRuntimeLoader($environment,
$this->renderer
);
} public function testThemeBlockInheritanceUsingUse() { $view =
$this->factory
->
createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType'
)