diff --git a/src/Field/Configurator/CountryConfigurator.php b/src/Field/Configurator/CountryConfigurator.php index f7b63ef984..c28e47132a 100644 --- a/src/Field/Configurator/CountryConfigurator.php +++ b/src/Field/Configurator/CountryConfigurator.php @@ -95,7 +95,7 @@ private function generateFormTypeChoices(string $countryCodeFormat, ?array $coun $countryCodeAlpha2 = $usesAlpha3Codes ? Countries::getAlpha2Code($countryCode) : $countryCode; $flagImagePath = $this->assetPackage->getUrl(sprintf('images/flags/%s.svg', $countryCodeAlpha2)); - $choiceKey = sprintf('
%s %s
', $flagImagePath, $countryName, $countryName); + $choiceKey = sprintf('
%s %s
', $flagImagePath, $countryName, $countryName); $choices[$choiceKey] = $countryCode; } diff --git a/tests/Field/CountryFieldTest.php b/tests/Field/CountryFieldTest.php index c0f8f461b0..e3e9915ae5 100644 --- a/tests/Field/CountryFieldTest.php +++ b/tests/Field/CountryFieldTest.php @@ -43,7 +43,7 @@ public function testDefaultOptionsForFormPages() $formSelectChoices = $fieldDto->getFormTypeOption(ChoiceField::OPTION_CHOICES); self::assertCount(self::NUM_COUNTRIES_AND_REGIONS, $formSelectChoices); - self::assertSame('GQ', $formSelectChoices['
Equatorial Guinea Equatorial Guinea
']); + self::assertSame('GQ', $formSelectChoices['
Equatorial Guinea Equatorial Guinea
']); self::assertSame('true', $fieldDto->getFormTypeOption('attr.data-ea-autocomplete-render-items-as-html')); }