1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

file_size_encode() test.

This commit is contained in:
Cameron
2020-12-26 11:11:35 -08:00
parent 3c6bdd35e0
commit c9ce6e1bd0
2 changed files with 51 additions and 24 deletions

View File

@@ -128,12 +128,26 @@ class e_fileTest extends \Codeception\Test\Unit
{
}
*/
public function testFile_size_encode()
{
$arr = array(
'1 kB' => 1024,
'2 kB' => 2048,
'1 MB' => 1048576,
'1 GB' => 1073741824,
'1 TB' => 1099511627776,
);
foreach($arr as $expected => $bytes)
{
$result = $this->fl->file_size_encode($bytes);
$this->assertSame($expected, $result);
}
}
/*
public function testMkDir()
{