Skip to content

Commit 30f7c4c

Browse files
Fixed failing unit-test
1 parent dc3892e commit 30f7c4c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/BooleanType.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
103103
));
104104

105105
$resolver->setAllowedTypes(array(
106-
'value_true' => array('string'),
107-
'value_false' => array('string'),
108-
'label_true' => array('string'),
109-
'label_false' => array('string'),
106+
'value_true' => array('string', 'integer'),
107+
'value_false' => array('string', 'integer'),
108+
'label_true' => array('string', 'null'),
109+
'label_false' => array('string', 'null'),
110110
));
111111

112112
$resolver->setAllowedValues(array(

tests/BooleanTypeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public function providerValueTrueFalse()
125125
'yes/no' => array('yes', 'no'),
126126
'on/off' => array('on', 'off'),
127127
'1/0' => array('1', '0'),
128+
'1/2' => array(1, 2),
128129
);
129130
}
130131

0 commit comments

Comments
 (0)