Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
satopian committed Jan 1, 2025
1 parent e4ade17 commit 0db37fe
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/CommonFunctionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0db37fe

Please sign in to comment.