Try LC_ALL instead.

This commit is contained in:
mark_story 2012-06-18 23:31:10 -04:00
parent 77fc8a9d33
commit 6a1e9e80b2

View file

@ -490,14 +490,14 @@ class CakeNumberTest extends CakeTestCase {
* @return void
*/
public function testReadableSizeLocalized() {
$restore = setlocale(LC_NUMERIC, 0);
setlocale(LC_NUMERIC, 'de_DE');
$restore = setlocale(LC_ALL, 0);
setlocale(LC_ALL, 'de_DE');
$result = $this->Number->toReadableSize(1321205);
$this->assertEquals('1,26 MB', $result);
$result = $this->Number->toReadableSize(1024 * 1024 * 1024 * 512);
$this->assertEquals('512,00 GB', $result);
setlocale(LC_NUMERIC, $restore);
setlocale(LC_ALL, $restore);
}
/**