Skip to content

Commit

Permalink
ROFE-0 Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurits Out committed Mar 1, 2021
1 parent cae7499 commit 984c1a4
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions test/model/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,7 @@ public function testDateTimeConversions()
$actualJacksonConvertedDateTime = new DateTime('2016-10-27T08:36:51.123+0000');
$actualJodaConvertedDateTime = new DateTime('2016-10-27T10:36:51.123+02:00');

$this->dumpDate($expectedPhpDateTime);
$this->dumpDate($actualJacksonConvertedDateTime);
$this->dumpDate($actualJodaConvertedDateTime);

$this->assertEquals($expectedPhpDateTime, $actualJacksonConvertedDateTime, 'Jackson conversion failed');
$this->assertEquals($expectedPhpDateTime, $actualJodaConvertedDateTime, 'Joda conversion failed');
}

/**
* @param $expectedPhpDateTime
*/
private function dumpDate(DateTime $expectedPhpDateTime)
{
echo 'Year: ' . $expectedPhpDateTime->format('Y') . "\n";
echo 'Month: ' . $expectedPhpDateTime->format('m') . "\n";
echo 'Day: ' . $expectedPhpDateTime->format('d') . "\n";
echo 'Hour: ' . $expectedPhpDateTime->format('H') . "\n";
echo 'Minute: ' . $expectedPhpDateTime->format('i') . "\n";
echo 'Second: ' . $expectedPhpDateTime->format('s') . "\n";
echo 'Millisecond: ' . $expectedPhpDateTime->format('u') . "\n";
echo 'Timezone: ' . $expectedPhpDateTime->format('e') . "\n\n";
}
}

0 comments on commit 984c1a4

Please sign in to comment.