diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-09 18:12:15 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-10-22 12:55:03 +0200 |
commit | 12266213d098a53c5f005b9afcbbe62771fd580c (patch) | |
tree | c7adfb280272fee16a5e2011f55315f838a07395 /tests/UtilsTest.php | |
parent | 72cfe44436f4316112fc4aabfe8940aa7b4adcab (diff) | |
download | Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.tar.gz Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.tar.zst Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.zip |
Shaarli's translation
* translation system and unit tests
* Translations everywhere
Dont use translation merge
It is not available with PHP builtin gettext, so it would have lead to inconsistency.
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r-- | tests/UtilsTest.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index 3d1aa653..840eaf21 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php | |||
@@ -384,18 +384,18 @@ class UtilsTest extends PHPUnit_Framework_TestCase | |||
384 | */ | 384 | */ |
385 | public function testHumanBytes() | 385 | public function testHumanBytes() |
386 | { | 386 | { |
387 | $this->assertEquals('2kiB', human_bytes(2 * 1024)); | 387 | $this->assertEquals('2'. t('kiB'), human_bytes(2 * 1024)); |
388 | $this->assertEquals('2kiB', human_bytes(strval(2 * 1024))); | 388 | $this->assertEquals('2'. t('kiB'), human_bytes(strval(2 * 1024))); |
389 | $this->assertEquals('2MiB', human_bytes(2 * (pow(1024, 2)))); | 389 | $this->assertEquals('2'. t('MiB'), human_bytes(2 * (pow(1024, 2)))); |
390 | $this->assertEquals('2MiB', human_bytes(strval(2 * (pow(1024, 2))))); | 390 | $this->assertEquals('2'. t('MiB'), human_bytes(strval(2 * (pow(1024, 2))))); |
391 | $this->assertEquals('2GiB', human_bytes(2 * (pow(1024, 3)))); | 391 | $this->assertEquals('2'. t('GiB'), human_bytes(2 * (pow(1024, 3)))); |
392 | $this->assertEquals('2GiB', human_bytes(strval(2 * (pow(1024, 3))))); | 392 | $this->assertEquals('2'. t('GiB'), human_bytes(strval(2 * (pow(1024, 3))))); |
393 | $this->assertEquals('374B', human_bytes(374)); | 393 | $this->assertEquals('374'. t('B'), human_bytes(374)); |
394 | $this->assertEquals('374B', human_bytes('374')); | 394 | $this->assertEquals('374'. t('B'), human_bytes('374')); |
395 | $this->assertEquals('232kiB', human_bytes(237481)); | 395 | $this->assertEquals('232'. t('kiB'), human_bytes(237481)); |
396 | $this->assertEquals('Unlimited', human_bytes('0')); | 396 | $this->assertEquals(t('Unlimited'), human_bytes('0')); |
397 | $this->assertEquals('Unlimited', human_bytes(0)); | 397 | $this->assertEquals(t('Unlimited'), human_bytes(0)); |
398 | $this->assertEquals('Setting not set', human_bytes('')); | 398 | $this->assertEquals(t('Setting not set'), human_bytes('')); |
399 | } | 399 | } |
400 | 400 | ||
401 | /** | 401 | /** |
@@ -403,9 +403,9 @@ class UtilsTest extends PHPUnit_Framework_TestCase | |||
403 | */ | 403 | */ |
404 | public function testGetMaxUploadSize() | 404 | public function testGetMaxUploadSize() |
405 | { | 405 | { |
406 | $this->assertEquals('1MiB', get_max_upload_size(2097152, '1024k')); | 406 | $this->assertEquals('1'. t('MiB'), get_max_upload_size(2097152, '1024k')); |
407 | $this->assertEquals('1MiB', get_max_upload_size('1m', '2m')); | 407 | $this->assertEquals('1'. t('MiB'), get_max_upload_size('1m', '2m')); |
408 | $this->assertEquals('100B', get_max_upload_size(100, 100)); | 408 | $this->assertEquals('100'. t('B'), get_max_upload_size(100, 100)); |
409 | } | 409 | } |
410 | 410 | ||
411 | /** | 411 | /** |