* * 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:----KkglQMB9+7u6tyRo4SjY7BR0+OCLQhD5bH+j4TNjnwb8PIujQUO9ggBoPonyoq8+1szAPg2FNbbfw6iFqnE30sJIBHW0r6/e6HQWP1GEcSjISXM/kcg4szqZ/D4LpUCovQb15a41EpmSuQXzyG4LfRnty5VFUTaRNfR4R1aZb8DOGytlxD23+dApxy+58hhynKqU9UB45FTllIQd6bWr9QUn5O6DbtaKtz48v42w4cBO64lSC8JOErrNcvA54DTnSi25yZFC4/LtQtRaajJJ55uywW5CYEMmrOmAXrnKE3UlcT+cHvW8CcqZa2iCmV1WvnpQgpCLe9puSE3koSePaZG72gU8aKEJZeQArMJ7VzoU8NebzIJsqbKqcdYGGJZf4X3whHoDfP+oyrq/3u6MImY0X9J1JUsBaGfl2slv5p68xwBaM6lf7kaTGpsGbe7cpCHkAY5ElnKOOM2pung9rHX8+KCKSJEh0HXlyfT121moJ9rM0y0Umt/XBIKpOykMX+L0Z8DbHVjUeZzS2zjQ1435XFAj9Uwb+fmWHl8sQ59pAmUa3zSHD9G2l/JsxRPPg2QrlfhO+HT4Yzwb/coxEZV06R1IO1Yu1V5OsuGUiqgAssyEho1neXnxUNvBEwMeCOJ1Lf/fgsfXXAjNktpzwBXb/SGb5i4ekgwbkvIC54g=----ATTACHMENT:----Mjg2NDQxNDc1MzM5MzY0MyA5ODQyMTQwNjI4NTQ2NjIgMTc1OTk1OTAzMzA0MjgyNQ==