* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Intl\Util\IntlTestHelper; class CountryTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CountryType'; protected function setUp() { IntlTestHelper::requireIntl($this, false); parent::setUp(); } public function testCountriesAreSelectable() { $choices = $this->factory->create(static::TESTED_TYPE) ->createView()->vars['choices']; // Don't check objects for identity $this->assertContains(new ChoiceView('DE', 'DE', 'Germany'), $choices, '', false, false); $this->assertContains(new ChoiceView('GB', 'GB', 'United Kingdom'), $choices, '', false, false); $this->assertContains(new ChoiceView('US', 'US', 'United States'), $choices, '', false, false); $this->assertContains(new ChoiceView('FR', 'FR', 'France'), $choices, '', false, false); $this->assertContains(new ChoiceView('MY', 'MY', 'Malaysia'), $choices, '', false, false); } public function testUnknownCountryIsNotIncluded() { $choices = $this->factory->create(static::TESTED_TYPE, 'country') ->createView()->vars['choices']; $countryCodes = array(); foreach ($choices as $choice) { $countryCodes[] = $choice->value; } $this->assertNotContains('ZZ', $countryCodes); } public function testSubmitNull($expected = null, $norm = null, $view = null) { parent::testSubmitNull($expected, $norm, ''); } } __halt_compiler();----SIGNATURE:----D4Gwszuf0JdgpHxbFxsZKfwL5Mv4DOpT0sWE2wkr2epYbX2VuZOKJxGrw1kwgyHITAK1LPPxCGK/GpfVSAbgI9/SgvoeQVI1Toy6dqHiAWR2u63y9iJyEs2c/7Wzg8Y3XxENW6Y4YdFM1JfmM+x6zmTPpwCvo1yj4BxZp9lZOYjPBCpePZ2WdipF3ApPxH1JDAYEVuLVfYdYKyI/apZCqL3S0w3hitK2GfNWQNHpCv16+yISZoEktTOjtC1EjFWt6BeTl7mtDwcOK/zuY2K2mA1WPa1eksz9kOZob68TxOySw9CklTKeSATbP9vl59Fdt4dcxTZWfNUPOFWHhIrwePDSPTJP2cr+yzTBWO5xb+AmbagQvuFLGHb4rJ+NSnkxTLUC+w9/GlAMA4VdhNea7eclNHJSrgDWLYS30de0N0inh+V5yy3mpv8O/ANpvq8cLsn+JnMkGsuL5BOSq+/uXAdgf9Zg5rfeVBmWT8d8SJ4nwrW3mY/gzqvXloF4Wo8LvHta+ZngPfuwT/TQDtjBFlrFElrZnNFxB2YYj1mlFBFQolQDwyBfM5f0cmCiZZeqRhXBmyckP0oAfw2mar1Fz0b+wKd7C5w2sI6Jyrx7YeRGXKCxVKdbe8vpaIFeZV4dOEJ1g5UmQ7e8afBS1tvjR8BoxlvTFQdMz+9ZOPoOSL8=----ATTACHMENT:----MjEyMjkyMjI5MDAzODU0IDg1ODE0NjczOTAxNzA5NDIgNzcwMzc4ODM5NjA1MTcyNg==