Thomas Rabaix 11 years ago
parent
commit
a21629c0d5
2 changed files with 3 additions and 3 deletions
  1. 1 1
      Form/Type/StatusType.php
  2. 2 2
      Tests/Form/Type/StatusTypeTest.php

+ 1 - 1
Form/Type/StatusType.php

@@ -56,7 +56,7 @@ class StatusType extends AbstractType
     public function setDefaultOptions(OptionsResolverInterface $resolver)
     {
         $resolver->setDefaults(array(
-            'choice' => call_user_func(array($this->class, $this->getter))
+            'choices' => call_user_func(array($this->class, $this->getter))
         ));
     }
 }

+ 2 - 2
Tests/Form/Type/StatusTypeTest.php

@@ -41,7 +41,7 @@ class StatusTypeTest extends TypeTestCase
 
         $options = $optionResolver->resolve(array());
 
-        $this->assertArrayHasKey('choice', $options);
-        $this->assertEquals($options['choice'], array(1 => 'salut'));
+        $this->assertArrayHasKey('choices', $options);
+        $this->assertEquals($options['choices'], array(1 => 'salut'));
     }
 }