mirror of
				https://bitbucket.org/jsuto/piler.git
				synced 2025-10-31 22:02:27 +01:00 
			
		
		
		
	Moved php unit tests to unit_tests/php dir
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
		
							
								
								
									
										28
									
								
								unit_tests/php/FormatTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								unit_tests/php/FormatTest.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| <?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); | ||||
|    } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user