merged branch bschussek/issue6862 (PR #7154)

This PR was merged into the 2.1 branch.

Commits
-------

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

Discussion
----------

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

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6862
| License       | MIT
| Doc PR        | -
This commit is contained in:
Fabien Potencier 2013-02-22 13:23:38 +01:00
commit f61295d67d

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']);
}
}