Skip to content
Permalink
Browse files

Try regexp as not all locales are available.

  • Loading branch information...
markstory committed Jun 19, 2012
1 parent 6a1e9e8 commit 89b2eddf0b54a88a5c48e13dd3b714d387b1ff5e
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Test/Case/Utility/CakeNumberTest.php
@@ -493,10 +493,10 @@ public function testReadableSizeLocalized() {
$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);
}

0 comments on commit 89b2edd

Please sign in to comment.
You can’t perform that action at this time.