mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-02 07:39:45 +00:00
Try LC_ALL instead.
This commit is contained in:
parent
77fc8a9d33
commit
6a1e9e80b2
1 changed files with 3 additions and 3 deletions
|
@ -490,14 +490,14 @@ class CakeNumberTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testReadableSizeLocalized() {
|
public function testReadableSizeLocalized() {
|
||||||
$restore = setlocale(LC_NUMERIC, 0);
|
$restore = setlocale(LC_ALL, 0);
|
||||||
setlocale(LC_NUMERIC, 'de_DE');
|
setlocale(LC_ALL, 'de_DE');
|
||||||
$result = $this->Number->toReadableSize(1321205);
|
$result = $this->Number->toReadableSize(1321205);
|
||||||
$this->assertEquals('1,26 MB', $result);
|
$this->assertEquals('1,26 MB', $result);
|
||||||
|
|
||||||
$result = $this->Number->toReadableSize(1024 * 1024 * 1024 * 512);
|
$result = $this->Number->toReadableSize(1024 * 1024 * 1024 * 512);
|
||||||
$this->assertEquals('512,00 GB', $result);
|
$this->assertEquals('512,00 GB', $result);
|
||||||
setlocale(LC_NUMERIC, $restore);
|
setlocale(LC_ALL, $restore);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue