Skip to content

Commit

Permalink
Fixed Num::quantity test for different localized decimal separator
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Bellini authored and WanWizard committed May 21, 2012
1 parent 4b153e7 commit 26267df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/num.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ public function test_quantity()

$this->assertEquals($expected, $output);

// Get current localized decimal separator
$locale_conv = localeconv();
$decimal_point = isset($locale_conv['decimal_point']) ? $locale_conv['decimal_point'] : '.';

$output = Num::quantity('7500', 1);
$expected = '7.5K';
$expected = '7'.$decimal_point.'5K';

$this->assertEquals($expected, $output);
}
Expand Down

0 comments on commit 26267df

Please sign in to comment.