Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
zendframework/zendframework#6058 - Timestamp tests should not use har…
Browse files Browse the repository at this point in the history
…dcoded (hard to read) timestamps
  • Loading branch information
Ocramius committed May 3, 2014
1 parent cfa0c12 commit 99ca6ed
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/Filter/TimestampTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ public function testIgnoresMessagesWithoutTimestamp(array $message)

public function dateTimeDataProvider()
{
$march2 = new DateTime('2014-03-02');
$march3 = new DateTime('2014-03-03');

return array(
array(new DateTime('2014-03-03'), new DateTime('2014-03-03'), '>=', true),
array(new DateTime('2014-10-10'), new DateTime('2014-03-03'),'>=', true),
Expand All @@ -127,10 +130,10 @@ public function dateTimeDataProvider()
array(new DateTime('2014-03-03'), new DateTime('2014-03-03'), '==', true),
array(new DateTime('2014-02-02'), new DateTime('2014-03-03'), '<', true),
array(new DateTime('2014-03-03'), new DateTime('2014-03-03'), 'lt', false),
array(1399140540, new DateTime('2014-03-03'), 'lt', false),
array(1399140480, new DateTime('2014-03-03'), 'lt', true),
array('1399140540', new DateTime('2014-03-03'), 'lt', false),
array('1399140480', new DateTime('2014-03-03'), 'lt', true),
array($march3->getTimestamp(), new DateTime('2014-03-03'), 'lt', false),
array($march2->getTimestamp(), new DateTime('2014-03-03'), 'lt', true),
array((string) $march3->getTimestamp(), new DateTime('2014-03-03'), 'lt', false),
array((string) $march2->getTimestamp(), new DateTime('2014-03-03'), 'lt', true),
);
}

Expand Down

0 comments on commit 99ca6ed

Please sign in to comment.