Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e97964e

Browse files
committed
Remove surplus quotes in validation message
1 parent 5b18041 commit e97964e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Validator/Constraints/TimezoneValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ private function formatExtraInfo($zone, $countryCode = null)
9393
}
9494
}
9595

96-
return $this->formatValue($value);
96+
return $value;
9797
}
9898
}

src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function testInvalidGroupedTimezones($timezone, $what, $extraInfo)
142142
$this->validator->validate($timezone, $constraint);
143143

144144
$this->buildViolation('myMessage')
145-
->setParameter('{{ extra_info }}', '"'.$extraInfo.'"')
145+
->setParameter('{{ extra_info }}', $extraInfo)
146146
->setCode(Timezone::NO_SUCH_TIMEZONE_IN_ZONE_ERROR)
147147
->assertRaised();
148148
}
@@ -206,7 +206,7 @@ public function testInvalidGroupedTimezonesByCountry($timezone, $what, $country,
206206
$this->validator->validate($timezone, $constraint);
207207

208208
$this->buildViolation('myMessage')
209-
->setParameter('{{ extra_info }}', '"'.$extraInfo.'"')
209+
->setParameter('{{ extra_info }}', $extraInfo)
210210
->setCode(Timezone::NO_SUCH_TIMEZONE_IN_COUNTRY_ERROR)
211211
->assertRaised();
212212
}

0 commit comments

Comments
 (0)