mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 05:30:12 +01:00
0659564b32
Signed-off-by: Janos SUTO <sj@acts.hu>
29 lines
592 B
PHP
29 lines
592 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
include_once("webui/system/model.php");
|
|
include_once("webui/model/health/health.php");
|
|
|
|
final class FormatTest extends TestCase
|
|
{
|
|
|
|
public function providerTestTimeFormatValues(){
|
|
return [
|
|
['0', '0.00 ms'],
|
|
['15', '15.00 sec'],
|
|
['0.87', '870.00 ms']
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @dataProvider providerTestTimeFormatValues
|
|
*/
|
|
|
|
public function test_format_time_1($timeval, $expected_result) {
|
|
$result = ModelHealthHealth::format_time($timeval);
|
|
$this->assertEquals($result, $expected_result);
|
|
}
|
|
|
|
}
|