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:
@@ -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()
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user