-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
EnhancementFormGood first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)
Description
I am not sure about whether this is a bug or by design: if a checkbox is bound to a boolean FALSE value, the checkbox is checked by default.
Failing test case:
public function testBindWithFalseValueUnchecked()
{
$form = $this->factory->create('checkbox', null, array(
'value' => '1',
));
$form->bind(false);
$this->assertFalse($form->getData());
$view = $form->createView();
$this->assertFalse($view->vars['checked']);
}
Metadata
Metadata
Assignees
Labels
EnhancementFormGood first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)