* * 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:----dQ0Xn/SKd3qAhkiIl5scjNcCTayvC4H8NUQmzLgTlJD86GAgPAnznrrydHKhJA5CzJUA3CaV6PZ9GMT4HKdwqsUC6/Sw9UkgvnKd8/JUABPkWaA3F63rtjep0C4wIMzVAIAxO3hbAXbMxQP5O+s7CgcuKMT1OvYoG3ygdYMv0VaF95hAC2IFsyHaikpjOZslYtDyOyzoMLod0MZLgVsunGtjp8eC4jghynKD9sCSsMfdtCJR7nGM2tZXrmVeai0IXBxi2XfyGgkamcG/zieNtaH5n1Df4refiSQ2LUrAMnaLIF76JtHoS+TW7A08MyWyN2q1eBEBy+KqB8ZqPaazQVYGJEaiGA8LAWbHpBWsMHvXZwfjX4Ml5ExrsmohjPZM2lmasujHmSmnhoaBLjgzEq3IWtC/YVOXmzHfmMZmrb4U+ePRs+iaRt2f/4sq6AYVYFjtLZqQ6x0q3Uw/9gvQjW6UzAaDEpCL1yl8nTzK6b4LHBB4nyJx/4+LAfB9JHTXt64n+LKiymRlzXN/I1c8axTj8tBH18XsUe4CjTQlpidAz6EETuynyZzNOs+KoL0M4tdwjEVi+/LROx4F8flDgj9TCGVuchGzEy122FAwxw/AFqeW6rtu3ZHdyWSRlx8mJvoVFpf1YJrLziq5vtJKnowPfTRsRsa+AIPr8cCmK/A=----ATTACHMENT:----ODkxMjMyODcyNDc0ODQ4NSAzMjE2ODE4NDc5MDc5NzMgODk1OTY4MDQ4OTMxMzc2NA==