Issue 5288 fix
This commit is contained in:
parent
ee90986c9f
commit
12a890f7cb
@ -210,7 +210,7 @@ class StubNumberFormatterTest extends LocaleTestCase
|
||||
|
||||
public function formatCurrencyWithCurrencyStyleBrazilianRealRoundingProvider()
|
||||
{
|
||||
$brl = $this->isIntlExtensionLoaded() && $this->isSameAsIcuVersion('4.8') ? 'BR' : 'R';
|
||||
$brl = $this->isIntlExtensionLoaded() && $this->isGreaterOrEqualThanIcuVersion('4.8') ? 'BR' : 'R';
|
||||
|
||||
return array(
|
||||
array(100, 'BRL', $brl, '%s$100.00'),
|
||||
|
@ -89,7 +89,16 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
|
||||
|
||||
protected function normalizeIcuVersion($version)
|
||||
{
|
||||
return ((float) $version) * 100;
|
||||
$versionIds = explode(".", $version);
|
||||
|
||||
$multi = 1000;
|
||||
$intVersion = 0;
|
||||
foreach ($versionIds as $id) {
|
||||
$intVersion += $id * $multi;
|
||||
$multi = $multi/10;
|
||||
}
|
||||
|
||||
return (int) $intVersion;
|
||||
}
|
||||
|
||||
protected function getIntlExtensionIcuVersion()
|
||||
|
Reference in New Issue
Block a user