Skip to content

Commit

Permalink
fix: add new data
Browse files Browse the repository at this point in the history
  • Loading branch information
Karol-Stelmaczonek committed Nov 27, 2023
1 parent 96cf3ed commit f0a15e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/unit/helpers/DateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class DateTest extends TestCase
/**
* @dataProvider microtimeProvider
*/
public function testMicrotimeFormat(string $microtime, string $expected)
public function testMicrotimeFormat(?string $microtime, ?string $expected)
{

$result = DateHelper::formatMicrotime($microtime);
$this->assertEquals($expected, $result);
}
Expand All @@ -42,7 +41,10 @@ public function microtimeProvider()
return [
['microtime' => '0.51487900 1701076034', 'expected' => '2023-11-27T09:07:14.514+00:00'],
['microtime' => '0.81487900 1701078054', 'expected' => '2023-11-27T09:40:54.814+00:00'],
['microtime' => '0.71487900 1701073054', 'expected' => '2023-11-27T08:17:34.714+00:00']
['microtime' => '0.71487900 1701073054', 'expected' => '2023-11-27T08:17:34.714+00:00'],
['microtime' => '0.0 1701073054', 'expected' => '2023-11-27T08:17:34.000+00:00'],
['microtime' => '0 1701073054', 'expected' => '2023-11-27T08:17:34.000+00:00'],
['microtime' => null, 'expected' => null]
];
}
}

0 comments on commit f0a15e5

Please sign in to comment.