@@ -30,14 +30,6 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase
3030'n/a ' =>'' ,
3131 );
3232
33- private $ numericChoicesFlipped =array (
34- 0 =>'Bernhard ' ,
35- 1 =>'Fabien ' ,
36- 2 =>'Kris ' ,
37- 3 =>'Jon ' ,
38- 4 =>'Roman ' ,
39- );
40-
4133private $ objectChoices ;
4234
4335protected $ groupedChoices =array (
@@ -110,9 +102,8 @@ public function testExpandedChoicesOptionsTurnIntoChildren()
110102
111103public function testChoiceListWithScalarValues ()
112104 {
113- $ view =$ this ->factory ->create ('choice ' ,null ,array (
105+ $ view =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,null ,array (
114106'choices ' =>$ this ->scalarChoices ,
115- 'choices_as_values ' =>true ,
116107 ))->createView ();
117108
118109$ this ->assertSame ('1 ' ,$ view ->vars ['choices ' ][0 ]->value );
@@ -125,19 +116,17 @@ public function testChoiceListWithScalarValues()
125116
126117public function testChoiceListWithScalarValuesAndFalseAsPreSetData ()
127118 {
128- $ view =$ this ->factory ->create ('choice ' ,false ,array (
119+ $ view =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,false ,array (
129120'choices ' =>$ this ->scalarChoices ,
130- 'choices_as_values ' =>true ,
131121 ))->createView ();
132122
133123$ this ->assertTrue ($ view ->vars ['is_selected ' ]($ view ->vars ['choices ' ][1 ]->value ,$ view ->vars ['value ' ]),'False value should be pre selected ' );
134124 }
135125
136126public function testExpandedChoiceListWithScalarValues ()
137127 {
138- $ view =$ this ->factory ->create ('choice ' ,null ,array (
128+ $ view =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,null ,array (
139129'choices ' =>$ this ->scalarChoices ,
140- 'choices_as_values ' =>true ,
141130'expanded ' =>true ,
142131 ))->createView ();
143132
@@ -148,9 +137,8 @@ public function testExpandedChoiceListWithScalarValues()
148137
149138public function testExpandedChoiceListWithScalarValuesAndFalseAsPreSetData ()
150139 {
151- $ view =$ this ->factory ->create ('choice ' ,false ,array (
140+ $ view =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,false ,array (
152141'choices ' =>$ this ->scalarChoices ,
153- 'choices_as_values ' =>true ,
154142'expanded ' =>true ,
155143 ))->createView ();
156144
@@ -217,7 +205,7 @@ public function testPlaceholderNotPresentIfEmptyChoice()
217205
218206public function testPlaceholderWithBooleanChoices ()
219207 {
220- $ form =$ this ->factory ->create ('choice ' ,null ,array (
208+ $ form =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,null ,array (
221209'multiple ' =>false ,
222210'expanded ' =>false ,
223211'required ' =>false ,
@@ -226,7 +214,6 @@ public function testPlaceholderWithBooleanChoices()
226214'No ' =>false ,
227215 ),
228216'placeholder ' =>'Select an option ' ,
229- 'choices_as_values ' =>true ,
230217 ));
231218
232219$ view =$ form ->createView ();
@@ -239,7 +226,7 @@ public function testPlaceholderWithBooleanChoices()
239226
240227public function testPlaceholderWithBooleanChoicesWithFalseAsPreSetData ()
241228 {
242- $ form =$ this ->factory ->create ('choice ' ,false ,array (
229+ $ form =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,false ,array (
243230'multiple ' =>false ,
244231'expanded ' =>false ,
245232'required ' =>false ,
@@ -248,7 +235,6 @@ public function testPlaceholderWithBooleanChoicesWithFalseAsPreSetData()
248235'No ' =>false ,
249236 ),
250237'placeholder ' =>'Select an option ' ,
251- 'choices_as_values ' =>true ,
252238 ));
253239
254240$ view =$ form ->createView ();
@@ -261,7 +247,7 @@ public function testPlaceholderWithBooleanChoicesWithFalseAsPreSetData()
261247
262248public function testPlaceholderWithExpandedBooleanChoices ()
263249 {
264- $ form =$ this ->factory ->create ('choice ' ,null ,array (
250+ $ form =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,null ,array (
265251'multiple ' =>false ,
266252'expanded ' =>true ,
267253'required ' =>false ,
@@ -270,7 +256,6 @@ public function testPlaceholderWithExpandedBooleanChoices()
270256'No ' =>false ,
271257 ),
272258'placeholder ' =>'Select an option ' ,
273- 'choices_as_values ' =>true ,
274259 ));
275260
276261$ this ->assertTrue (isset ($ form ['placeholder ' ]),'Placeholder should be set ' );
@@ -286,7 +271,7 @@ public function testPlaceholderWithExpandedBooleanChoices()
286271
287272public function testPlaceholderWithExpandedBooleanChoicesAndWithFalseAsPreSetData ()
288273 {
289- $ form =$ this ->factory ->create ('choice ' ,false ,array (
274+ $ form =$ this ->factory ->create ('Symfony\Component\Form\Extension\Core\Type\ChoiceType ' ,false ,array (
290275'multiple ' =>false ,
291276'expanded ' =>true ,
292277'required ' =>false ,
@@ -295,7 +280,6 @@ public function testPlaceholderWithExpandedBooleanChoicesAndWithFalseAsPreSetDat
295280'No ' =>false ,
296281 ),
297282'placeholder ' =>'Select an option ' ,
298- 'choices_as_values ' =>true ,
299283 ));
300284
301285$ this ->assertTrue (isset ($ form ['placeholder ' ]),'Placeholder should be set ' );