$html =
$this->
renderStart($form->
createView(),
[ 'method' => 'post',
'action' => 'http://foo.com/directory',
]);
$this->
assertSame('<form name="form" method="post" action="http://foo.com/directory">',
$html);
} public function testStartTagForMultipartForm() { $form =
$this->factory->
createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null,
[ 'method' => 'get',
'action' => 'http://example.com/directory',
]) ->
add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType'
) ->
getForm();
$html =
$this->
renderStart($form->
createView());
$this->
assertSame('<form name="form" method="get" action="http://example.com/directory" enctype="multipart/form-data">',
$html);
}