[Form] Fix missing choices_as_values=true in tests
This commit is contained in:
parent
ff582b8ac9
commit
2a16e87aec
@ -212,7 +212,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoice()
|
public function testSingleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
));
|
));
|
||||||
@ -234,7 +235,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceWithoutTranslation()
|
public function testSingleChoiceWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'choice_translation_domain' => false,
|
'choice_translation_domain' => false,
|
||||||
@ -257,7 +259,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceAttributes()
|
public function testSingleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -282,7 +285,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceWithPreferred()
|
public function testSingleChoiceWithPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&b'),
|
'preferred_choices' => array('&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -306,7 +310,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceWithPreferredAndNoSeparator()
|
public function testSingleChoiceWithPreferredAndNoSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&b'),
|
'preferred_choices' => array('&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -329,7 +334,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&b'),
|
'preferred_choices' => array('&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -353,7 +359,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testChoiceWithOnlyPreferred()
|
public function testChoiceWithOnlyPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&a', '&b'),
|
'preferred_choices' => array('&a', '&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -370,7 +377,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceNonRequired()
|
public function testSingleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -394,7 +402,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceNonRequiredNoneSelected()
|
public function testSingleChoiceNonRequiredNoneSelected()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', null, array(
|
$form = $this->factory->createNamed('name', 'choice', null, array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -418,7 +427,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceNonRequiredWithPlaceholder()
|
public function testSingleChoiceNonRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
@ -443,7 +453,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceRequiredWithPlaceholder()
|
public function testSingleChoiceRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -468,7 +479,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -493,9 +505,10 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array(
|
'choices' => array(
|
||||||
'Group&1' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'Group&1' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
'Group&2' => array('&c' => 'Choice&C'),
|
'Group&2' => array('Choice&C' => '&c'),
|
||||||
),
|
),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
));
|
));
|
||||||
@ -523,7 +536,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoice()
|
public function testMultipleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -547,7 +561,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceAttributes()
|
public function testMultipleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
@ -574,7 +589,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceSkipsPlaceholder()
|
public function testMultipleChoiceSkipsPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'placeholder' => 'Test&Me',
|
'placeholder' => 'Test&Me',
|
||||||
@ -597,7 +613,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceNonRequired()
|
public function testMultipleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -620,7 +637,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpanded()
|
public function testSingleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
));
|
));
|
||||||
@ -655,7 +673,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedWithoutTranslation()
|
public function testSingleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'choice_translation_domain' => false,
|
'choice_translation_domain' => false,
|
||||||
@ -691,7 +710,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedAttributes()
|
public function testSingleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
@ -729,7 +749,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedWithPlaceholder()
|
public function testSingleChoiceExpandedWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'placeholder' => 'Test&Me',
|
'placeholder' => 'Test&Me',
|
||||||
@ -774,7 +795,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedWithBooleanValue()
|
public function testSingleChoiceExpandedWithBooleanValue()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', true, array(
|
$form = $this->factory->createNamed('name', 'choice', true, array(
|
||||||
'choices' => array('1' => 'Choice&A', '0' => 'Choice&B'),
|
'choices' => array('Choice&A' => '1', 'Choice&B' => '0'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
));
|
));
|
||||||
@ -809,7 +831,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceExpanded()
|
public function testMultipleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B', '&c' => 'Choice&C'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@ -854,7 +877,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceExpandedWithoutTranslation()
|
public function testMultipleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B', '&c' => 'Choice&C'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@ -900,7 +924,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceExpandedAttributes()
|
public function testMultipleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B', '&c' => 'Choice&C'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
|
@ -692,7 +692,8 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest
|
|||||||
public function testChoiceRowWithCustomBlock()
|
public function testChoiceRowWithCustomBlock()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamedBuilder('name_c', 'choice', 'a', array(
|
$form = $this->factory->createNamedBuilder('name_c', 'choice', 'a', array(
|
||||||
'choices' => array('a' => 'ChoiceA', 'b' => 'ChoiceB'),
|
'choices' => array('ChoiceA' => 'a', 'ChoiceB' => 'b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
))
|
))
|
||||||
->getForm();
|
->getForm();
|
||||||
|
@ -497,7 +497,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoice()
|
public function testSingleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
));
|
));
|
||||||
@ -530,7 +531,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithoutTranslation()
|
public function testSingleChoiceWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'choice_translation_domain' => false,
|
'choice_translation_domain' => false,
|
||||||
@ -552,7 +554,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceAttributes()
|
public function testSingleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -576,7 +579,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithPreferred()
|
public function testSingleChoiceWithPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&b'),
|
'preferred_choices' => array('&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -599,7 +603,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithPreferredAndNoSeparator()
|
public function testSingleChoiceWithPreferredAndNoSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&b'),
|
'preferred_choices' => array('&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -621,7 +626,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&b'),
|
'preferred_choices' => array('&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -644,7 +650,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testChoiceWithOnlyPreferred()
|
public function testChoiceWithOnlyPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'preferred_choices' => array('&a', '&b'),
|
'preferred_choices' => array('&a', '&b'),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -660,7 +667,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceNonRequired()
|
public function testSingleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -683,7 +691,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceNonRequiredNoneSelected()
|
public function testSingleChoiceNonRequiredNoneSelected()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', null, array(
|
$form = $this->factory->createNamed('name', 'choice', null, array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -706,7 +715,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceNonRequiredWithPlaceholder()
|
public function testSingleChoiceNonRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
@ -730,7 +740,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceRequiredWithPlaceholder()
|
public function testSingleChoiceRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -757,7 +768,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -784,9 +796,10 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array(
|
'choices' => array(
|
||||||
'Group&1' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'Group&1' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
'Group&2' => array('&c' => 'Choice&C'),
|
'Group&2' => array('Choice&C' => '&c'),
|
||||||
),
|
),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
));
|
));
|
||||||
@ -813,7 +826,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoice()
|
public function testMultipleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -836,7 +850,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceAttributes()
|
public function testMultipleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
@ -862,7 +877,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceSkipsPlaceholder()
|
public function testMultipleChoiceSkipsPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'placeholder' => 'Test&Me',
|
'placeholder' => 'Test&Me',
|
||||||
@ -884,7 +900,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceNonRequired()
|
public function testMultipleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
@ -906,7 +923,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpanded()
|
public function testSingleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
));
|
));
|
||||||
@ -928,7 +946,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedWithoutTranslation()
|
public function testSingleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'choice_translation_domain' => false,
|
'choice_translation_domain' => false,
|
||||||
@ -951,7 +970,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedAttributes()
|
public function testSingleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
@ -976,7 +996,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedWithPlaceholder()
|
public function testSingleChoiceExpandedWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
$form = $this->factory->createNamed('name', 'choice', '&a', array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'placeholder' => 'Test&Me',
|
'placeholder' => 'Test&Me',
|
||||||
@ -1001,7 +1022,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedWithBooleanValue()
|
public function testSingleChoiceExpandedWithBooleanValue()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', true, array(
|
$form = $this->factory->createNamed('name', 'choice', true, array(
|
||||||
'choices' => array('1' => 'Choice&A', '0' => 'Choice&B'),
|
'choices' => array('Choice&A' => '1', 'Choice&B' => '0'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
));
|
));
|
||||||
@ -1023,7 +1045,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceExpanded()
|
public function testMultipleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B', '&c' => 'Choice&C'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@ -1048,7 +1071,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceExpandedWithoutTranslation()
|
public function testMultipleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B', '&c' => 'Choice&C'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@ -1074,7 +1098,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceExpandedAttributes()
|
public function testMultipleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array(
|
||||||
'choices' => array('&a' => 'Choice&A', '&b' => 'Choice&B', '&c' => 'Choice&C'),
|
'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')),
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
|
Reference in New Issue
Block a user