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

Skip to content

Commit 97bc257

Browse files
committed
[Locale] Rolled back normalizeIcuVersion() method in unit tests.
This makes it consistent with 2.0 and 2.1. We just need to check if version is 4.4 or 4.8 and we do not need to know if it is 4.8.0 or 4.8.1.1 (at least for now there are no big differences between minor ICU versions).
1 parent 31ff3db commit 97bc257

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Symfony/Component/Locale/Tests/TestCase.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,7 @@ protected function isLowerThanIcuVersion($version)
8989

9090
protected function normalizeIcuVersion($version)
9191
{
92-
$versionIds = explode('.', $version);
93-
94-
$multi = 1000;
95-
$intVersion = 0;
96-
foreach ($versionIds as $id) {
97-
$intVersion += $id * $multi;
98-
$multi = $multi / 10;
99-
}
100-
101-
return (int) $intVersion;
92+
return ((float) $version) * 100;
10293
}
10394

10495
protected function getIntlExtensionIcuVersion()

0 commit comments

Comments
 (0)