Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsche authored and jmsche committed Aug 31, 2024
1 parent 45b3bc4 commit 4d2e642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Twig/Extension/DateExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function timeAgoData(): iterable
yield [new \DateTime('-2 minutes'), 'timeago.minutesago|%minutes%=2|%count%=2'];
yield [new \DateTime('-2 hours'), 'timeago.hoursago|%hours%=2|%count%=2'];
yield [new \DateTime('-2 days'), 'timeago.daysago|%days%=2|%count%=2'];
yield [new \DateTime('-2 months'), 'timeago.monthsago|%months%=2|%count%=2'];
yield [new \DateTime('-2 months -3 days'), 'timeago.monthsago|%months%=2|%count%=2'];

$twoYears = new \DateTimeImmutable('-2 years');

Expand All @@ -52,7 +52,7 @@ public static function timeAgoData(): iterable
yield [new \DateTimeImmutable('-2 minutes'), 'timeago.minutesago|%minutes%=2|%count%=2'];
yield [new \DateTimeImmutable('-2 hours'), 'timeago.hoursago|%hours%=2|%count%=2'];
yield [new \DateTimeImmutable('-2 days'), 'timeago.daysago|%days%=2|%count%=2'];
yield [new \DateTimeImmutable('-2 months'), 'timeago.monthsago|%months%=2|%count%=2'];
yield [new \DateTimeImmutable('-2 months -3 days'), 'timeago.monthsago|%months%=2|%count%=2'];

// Check with string
yield [$twoYears->format('Y-m-d H:i:s'), 'timeago.yearsago|%years%=2|%count%=2'];
Expand Down

0 comments on commit 4d2e642

Please sign in to comment.