30 lines
658 B
PHP
30 lines
658 B
PHP
<?php
|
|
|
|
use adeattwood\helpers\Enum;
|
|
|
|
/**
|
|
* @category PHP
|
|
* @package adeattwood\yii-helpers
|
|
* @author Ade Attwood <attwood16@googlemail.com>
|
|
* @copyright 2017 adeattwood.co.uk
|
|
* @license BSD-2-Clause http://adeattwood.co.uk/license.html
|
|
* @link adeattwood.co.uk
|
|
* @since v0.1
|
|
*/
|
|
class EnumCest
|
|
{
|
|
|
|
public function _before( UnitTester $I )
|
|
{
|
|
}
|
|
|
|
public function _after( UnitTester $I )
|
|
{
|
|
}
|
|
|
|
public function testNumberArray( UnitTester $I )
|
|
{
|
|
$I->assertEquals( Enum::formatBytes( 28434322.25 ), "27.12 MB" );
|
|
$I->assertEquals( Enum::formatBytes( 17328347842.25, 3 ), "16.138 GB" );
|
|
}
|
|
}
|