Browse files

Try regexp as not all locales are available.

  • Loading branch information...
1 parent 6a1e9e8 commit 89b2eddf0b54a88a5c48e13dd3b714d387b1ff5e @markstory markstory committed Jun 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Test/Case/Utility/CakeNumberTest.php
View
4 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.