diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php index 958bb66d506b0..08e4285f0cd53 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php @@ -209,6 +209,13 @@ public function testGetValuesForChoicesEmpty() $this->assertSame(array(), $this->list->getValuesForChoices(array())); } + public function testGetChoicesForValuesWithNull() + { + $values = $this->list->getValuesForChoices(array(null)); + + $this->assertNotEmpty($this->list->getChoicesForValues($values)); + } + /** * @return \Symfony\Component\Form\ChoiceList\ChoiceListInterface */ diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php index 9ea5f631a1585..f054fd70c07a6 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php @@ -22,9 +22,9 @@ class ArrayChoiceListTest extends AbstractChoiceListTest protected function setUp() { - parent::setUp(); - $this->object = new \stdClass(); + + parent::setUp(); } protected function createChoiceList() @@ -34,12 +34,12 @@ protected function createChoiceList() protected function getChoices() { - return array(0, 1, '1', 'a', false, true, $this->object); + return array(0, 1, '1', 'a', false, true, $this->object, null); } protected function getValues() { - return array('0', '1', '2', '3', '4', '5', '6'); + return array('0', '1', '2', '3', '4', '5', '6', '7'); } /**
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: