Skip to content

Commit

Permalink
check timestamps to ignore ms differences
Browse files Browse the repository at this point in the history
  • Loading branch information
IonBazan committed Dec 11, 2020
1 parent 1f1bdd8 commit 1eb39f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Faker/Provider/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ public function testDateTimeBetween($start, $end)
{
$date = DateTimeProvider::dateTimeBetween($start, $end);
$this->assertInstanceOf('\DateTime', $date);
$this->assertGreaterThanOrEqual(new \DateTime($start), $date);
$this->assertLessThanOrEqual(new \DateTime($end), $date);
$this->assertGreaterThanOrEqual((new \DateTime($start))->getTimestamp(), $date->getTimestamp());
$this->assertLessThanOrEqual((new \DateTime($end))->getTimestamp(), $date->getTimestamp());
$this->assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone());
}

Expand Down

0 comments on commit 1eb39f4

Please sign in to comment.