Skip to content

Commit

Permalink
merged branch jakzal/icu-tests-fix-master (PR #6568)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Commits
-------

97bc257 [Locale] Rolled back normalizeIcuVersion() method in unit tests.

Discussion
----------

[Locale] Rolled back normalizeIcuVersion() method in unit tests.

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).

This change basically rolls back modifications made in #6109 to fix #5288. Those modifications didn't really fix the issue since ICU>=4.9 wasn't handled properly. Part of the roll back was made in #6515 (2.1 branch).

This change makes master branch consistent with what we have in 2.0 and 2.1 (bespoke tests are passing in those branches).

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: one test fails in the Propel1 bridge
Fixes the following tickets: #5517
Todo: -
License of the code: MIT
Documentation PR: -
  • Loading branch information
fabpot committed Jan 5, 2013
2 parents 48c839d + 97bc257 commit 0887fcb
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/Symfony/Component/Locale/Tests/TestCase.php
Expand Up @@ -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()
Expand Down

0 comments on commit 0887fcb

Please sign in to comment.