aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-04-03 18:53:17 +0200
committerArthurHoaro <arthur@hoa.ro>2017-04-03 18:53:43 +0200
commitb68134ac1d6a287e3a5003ccde137dd0c7ecdc52 (patch)
tree6fd8c8319ece5e7e565f1793318ff63c665daf74 /tests
parent84315a3bad02652e5ea26586fab003eaaf467e30 (diff)
downloadShaarli-b68134ac1d6a287e3a5003ccde137dd0c7ecdc52.tar.gz
Shaarli-b68134ac1d6a287e3a5003ccde137dd0c7ecdc52.tar.zst
Shaarli-b68134ac1d6a287e3a5003ccde137dd0c7ecdc52.zip
UtilsTest: PHP 5.5 compatibility
Diffstat (limited to 'tests')
-rw-r--r--tests/UtilsTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php
index e95c6248..e5ff01e6 100644
--- a/tests/UtilsTest.php
+++ b/tests/UtilsTest.php
@@ -366,10 +366,10 @@ class UtilsTest extends PHPUnit_Framework_TestCase
366 { 366 {
367 $this->assertEquals(2 * 1024, return_bytes('2k')); 367 $this->assertEquals(2 * 1024, return_bytes('2k'));
368 $this->assertEquals(2 * 1024, return_bytes('2K')); 368 $this->assertEquals(2 * 1024, return_bytes('2K'));
369 $this->assertEquals(2 * (1024 ** 2), return_bytes('2m')); 369 $this->assertEquals(2 * (pow(1024, 2)), return_bytes('2m'));
370 $this->assertEquals(2 * (1024 ** 2), return_bytes('2M')); 370 $this->assertEquals(2 * (pow(1024, 2)), return_bytes('2M'));
371 $this->assertEquals(2 * (1024 ** 3), return_bytes('2g')); 371 $this->assertEquals(2 * (pow(1024, 3)), return_bytes('2g'));
372 $this->assertEquals(2 * (1024 ** 3), return_bytes('2G')); 372 $this->assertEquals(2 * (pow(1024, 3)), return_bytes('2G'));
373 $this->assertEquals(374, return_bytes('374')); 373 $this->assertEquals(374, return_bytes('374'));
374 $this->assertEquals(374, return_bytes(374)); 374 $this->assertEquals(374, return_bytes(374));
375 $this->assertEquals(0, return_bytes('0')); 375 $this->assertEquals(0, return_bytes('0'));
@@ -386,10 +386,10 @@ class UtilsTest extends PHPUnit_Framework_TestCase
386 { 386 {
387 $this->assertEquals('2kiB', human_bytes(2 * 1024)); 387 $this->assertEquals('2kiB', human_bytes(2 * 1024));
388 $this->assertEquals('2kiB', human_bytes(strval(2 * 1024))); 388 $this->assertEquals('2kiB', human_bytes(strval(2 * 1024)));
389 $this->assertEquals('2MiB', human_bytes(2 * (1024 ** 2))); 389 $this->assertEquals('2MiB', human_bytes(2 * (pow(1024, 2))));
390 $this->assertEquals('2MiB', human_bytes(strval(2 * (1024 ** 2)))); 390 $this->assertEquals('2MiB', human_bytes(strval(2 * (pow(1024, 2)))));
391 $this->assertEquals('2GiB', human_bytes(2 * (1024 ** 3))); 391 $this->assertEquals('2GiB', human_bytes(2 * (pow(1024, 3))));
392 $this->assertEquals('2GiB', human_bytes(strval(2 * (1024 ** 3)))); 392 $this->assertEquals('2GiB', human_bytes(strval(2 * (pow(1024, 3)))));
393 $this->assertEquals('374B', human_bytes(374)); 393 $this->assertEquals('374B', human_bytes(374));
394 $this->assertEquals('374B', human_bytes('374')); 394 $this->assertEquals('374B', human_bytes('374'));
395 $this->assertEquals('Unlimited', human_bytes('0')); 395 $this->assertEquals('Unlimited', human_bytes('0'));