From 00fbb7ec32943f2869b3b094b3c1700051cd3d14 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Thu, 21 Feb 2013 18:06:34 +0100 Subject: [PATCH] [Form] Added test for "label" option to accept the value "0" --- .../Form/Tests/Extension/Core/Type/FormTypeTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php index 6fbddeb6a4..274bb912d3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php @@ -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']); + } }