From 97bc257c69903d5bd5ba4c43cb07e0f2bc95f469 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sat, 5 Jan 2013 11:41:28 +0100 Subject: [PATCH] [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). --- src/Symfony/Component/Locale/Tests/TestCase.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Symfony/Component/Locale/Tests/TestCase.php b/src/Symfony/Component/Locale/Tests/TestCase.php index aa772f25e31c..b6483285a25f 100644 --- a/src/Symfony/Component/Locale/Tests/TestCase.php +++ b/src/Symfony/Component/Locale/Tests/TestCase.php @@ -89,16 +89,7 @@ protected function isLowerThanIcuVersion($version) protected function normalizeIcuVersion($version) { - $versionIds = explode('.', $version); - - $multi = 1000; - $intVersion = 0; - foreach ($versionIds as $id) { - $intVersion += $id * $multi; - $multi = $multi / 10; - } - - return (int) $intVersion; + return ((float) $version) * 100; } protected function getIntlExtensionIcuVersion()