mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 10:02:42 +00:00
Try regexp as not all locales are available.
This commit is contained in:
parent
6a1e9e80b2
commit
89b2eddf0b
1 changed files with 2 additions and 2 deletions
|
@ -493,10 +493,10 @@ class CakeNumberTest extends CakeTestCase {
|
|||
$restore = setlocale(LC_ALL, 0);
|
||||
setlocale(LC_ALL, 'de_DE');
|
||||
$result = $this->Number->toReadableSize(1321205);
|
||||
$this->assertEquals('1,26 MB', $result);
|
||||
$this->assertRegExp('/1[,.]26 MB/', $result);
|
||||
|
||||
$result = $this->Number->toReadableSize(1024 * 1024 * 1024 * 512);
|
||||
$this->assertEquals('512,00 GB', $result);
|
||||
$this->assertRegExp('/512[,.]00 GB/', $result);
|
||||
setlocale(LC_ALL, $restore);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue