aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/UtilsTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-10-22 13:19:51 +0200
committerGitHub <noreply@github.com>2017-10-22 13:19:51 +0200
commitd8acf8550480694d050091e270a06c01e7b313f0 (patch)
treef62befb2351c4b6550f71e11f6845bc3acb78a5d /tests/UtilsTest.php
parentefd3a6405a381501b070b8805ae37d1313969784 (diff)
parent1a47014f99d2f7aae00d37e62e0364d4eaa1ce29 (diff)
downloadShaarli-d8acf8550480694d050091e270a06c01e7b313f0.tar.gz
Shaarli-d8acf8550480694d050091e270a06c01e7b313f0.tar.zst
Shaarli-d8acf8550480694d050091e270a06c01e7b313f0.zip
Merge pull request #871 from ArthurHoaro/feature/translation
Shaarli's translation
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r--tests/UtilsTest.php30
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 /**