diff --git a/tests/CommonFunctionTest.php b/tests/CommonFunctionTest.php index a922c232..45852955 100644 --- a/tests/CommonFunctionTest.php +++ b/tests/CommonFunctionTest.php @@ -224,6 +224,25 @@ public function calculatePaintTimeProvider(): array [194766, ['ja' => '2日6時間6分6秒', 'en' => '2 days 6 hours 6 min 6 sec']], ]; } + /** + * @dataProvider microtime2TimeProvider + * @covers microtime2time + */ + public function testMicrotime2time($microtime, int $expected): void + { + + $actual = microtime2time($microtime); + + $this->assertEquals($expected, $actual); + } + + public function microtime2TimeProvider(): array + { + return [ + ["1620000000000000", 1620000000], + ["1620000000000", 1620000000], + ]; + } /** * @dataProvider calc_remaining_time_to_close_thread_Provider * @covers calc_remaining_time_to_close_thread