[Form] Added test for "label" option to accept the value "0"

This commit is contained in:
Bernhard Schussek 2013-02-21 18:06:34 +01:00
parent 0fb397ccfb
commit 00fbb7ec32

View File

@ -659,4 +659,15 @@ class FormTypeTest extends TypeTestCase
$this->assertSame('foo', $view->vars['data']);
$this->assertSame('bar', $view->vars['value']);
}
// https://github.com/symfony/symfony/issues/6862
public function testPassZeroLabelToView()
{
$view = $this->factory->create('form', null, array(
'label' => '0'
))
->createView();
$this->assertSame('0', $view->vars['label']);
}
}