From ceab083b5e0f708bdb051eb622eea3fbea5726ce Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 20 Aug 2018 13:48:29 -0700 Subject: [PATCH] file_size_decode() test added. --- tests/unit/e_fileTest.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/unit/e_fileTest.php b/tests/unit/e_fileTest.php index cf5fb4804..97d36ad2e 100644 --- a/tests/unit/e_fileTest.php +++ b/tests/unit/e_fileTest.php @@ -163,12 +163,27 @@ { } - +*/ public function testFile_size_decode() { + $arr = array( + '1024' => 1024, + '2kb' => 2048, + '1KB' => 1024, + '1M' => 1048576, + '1G' => 1073741824, + '1Gb' => 1073741824, + '1TB' => 1099511627776, + ); + + foreach($arr as $key => $expected) + { + $actual = $this->fl->file_size_decode($key); + $this->assertEquals($expected,$actual, $key." does not equal ".$expected." bytes"); + } } - +/* public function testZip() {