Merge branch '2.7' into 2.8
* 2.7: [Form] Fix missing choices_as_values=true in tests Conflicts: src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
This commit is contained in:
commit
de08816caa
@ -212,7 +212,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoice()
|
public function testSingleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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 testSingleChoiceWithPlaceholderWithoutTranslation()
|
public function testSingleChoiceWithPlaceholderWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -283,7 +286,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceAttributes()
|
public function testSingleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -308,7 +312,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceWithPreferred()
|
public function testSingleChoiceWithPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -332,7 +337,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceWithPreferredAndNoSeparator()
|
public function testSingleChoiceWithPreferredAndNoSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -355,7 +361,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -379,7 +386,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testChoiceWithOnlyPreferred()
|
public function testChoiceWithOnlyPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -396,7 +404,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceNonRequired()
|
public function testSingleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -420,7 +429,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceNonRequiredNoneSelected()
|
public function testSingleChoiceNonRequiredNoneSelected()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -444,7 +454,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceNonRequiredWithPlaceholder()
|
public function testSingleChoiceNonRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -469,7 +480,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceRequiredWithPlaceholder()
|
public function testSingleChoiceRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -494,7 +506,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -519,9 +532,10 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
));
|
));
|
||||||
@ -549,7 +563,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoice()
|
public function testMultipleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -573,7 +588,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceAttributes()
|
public function testMultipleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -600,7 +616,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceSkipsPlaceholder()
|
public function testMultipleChoiceSkipsPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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',
|
||||||
@ -623,7 +640,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceNonRequired()
|
public function testMultipleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -646,7 +664,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpanded()
|
public function testSingleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
));
|
));
|
||||||
@ -681,7 +700,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedWithoutTranslation()
|
public function testSingleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -717,7 +737,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedAttributes()
|
public function testSingleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -755,7 +776,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedWithPlaceholder()
|
public function testSingleChoiceExpandedWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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',
|
||||||
@ -800,7 +822,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation()
|
public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
'translation_domain' => false,
|
'translation_domain' => false,
|
||||||
@ -846,7 +869,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testSingleChoiceExpandedWithBooleanValue()
|
public function testSingleChoiceExpandedWithBooleanValue()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', true, array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
));
|
));
|
||||||
@ -881,7 +905,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceExpanded()
|
public function testMultipleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -926,7 +951,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceExpandedWithoutTranslation()
|
public function testMultipleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -972,7 +998,8 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
|||||||
public function testMultipleChoiceExpandedAttributes()
|
public function testMultipleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
|
@ -691,7 +691,8 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest
|
|||||||
public function testChoiceRowWithCustomBlock()
|
public function testChoiceRowWithCustomBlock()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamedBuilder('name_c', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 'a', array(
|
$form = $this->factory->createNamedBuilder('name_c', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 'a', array(
|
||||||
'choices' => array('a' => 'ChoiceA', 'b' => 'ChoiceB'),
|
'choices' => array('ChoiceA' => 'a', 'ChoiceB' => 'b'),
|
||||||
|
'choices_as_values' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
))
|
))
|
||||||
->getForm();
|
->getForm();
|
||||||
|
@ -516,7 +516,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoice()
|
public function testSingleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
));
|
));
|
||||||
@ -549,7 +550,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithoutTranslation()
|
public function testSingleChoiceWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -571,7 +573,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithPlaceholderWithoutTranslation()
|
public function testSingleChoiceWithPlaceholderWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -596,7 +599,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceAttributes()
|
public function testSingleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -620,7 +624,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithPreferred()
|
public function testSingleChoiceWithPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -643,7 +648,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithPreferredAndNoSeparator()
|
public function testSingleChoiceWithPreferredAndNoSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -665,7 +671,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
public function testSingleChoiceWithPreferredAndBlankSeparator()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -688,7 +695,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testChoiceWithOnlyPreferred()
|
public function testChoiceWithOnlyPreferred()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -704,7 +712,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceNonRequired()
|
public function testSingleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -727,7 +736,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceNonRequiredNoneSelected()
|
public function testSingleChoiceNonRequiredNoneSelected()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -750,7 +760,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceNonRequiredWithPlaceholder()
|
public function testSingleChoiceNonRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -774,7 +785,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceRequiredWithPlaceholder()
|
public function testSingleChoiceRequiredWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -801,7 +813,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
public function testSingleChoiceRequiredWithPlaceholderViaView()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -828,9 +841,10 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
));
|
));
|
||||||
@ -857,7 +871,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoice()
|
public function testMultipleChoice()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -880,7 +895,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceAttributes()
|
public function testMultipleChoiceAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -906,7 +922,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceSkipsPlaceholder()
|
public function testMultipleChoiceSkipsPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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',
|
||||||
@ -928,7 +945,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceNonRequired()
|
public function testMultipleChoiceNonRequired()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -950,7 +968,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpanded()
|
public function testSingleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
));
|
));
|
||||||
@ -972,7 +991,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedWithoutTranslation()
|
public function testSingleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -995,7 +1015,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedAttributes()
|
public function testSingleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
@ -1020,7 +1041,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedWithPlaceholder()
|
public function testSingleChoiceExpandedWithPlaceholder()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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',
|
||||||
@ -1045,7 +1067,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation()
|
public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&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,
|
||||||
'translation_domain' => false,
|
'translation_domain' => false,
|
||||||
@ -1071,7 +1094,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testSingleChoiceExpandedWithBooleanValue()
|
public function testSingleChoiceExpandedWithBooleanValue()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', true, array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
));
|
));
|
||||||
@ -1093,7 +1117,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceExpanded()
|
public function testMultipleChoiceExpanded()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -1118,7 +1143,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceExpandedWithoutTranslation()
|
public function testMultipleChoiceExpandedWithoutTranslation()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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,
|
||||||
@ -1144,7 +1170,8 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
|||||||
public function testMultipleChoiceExpandedAttributes()
|
public function testMultipleChoiceExpandedAttributes()
|
||||||
{
|
{
|
||||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array(
|
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 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