Skip to content

Commit

Permalink
Fix date-related test for PHP 5
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Aug 25, 2023
1 parent 63fbbb1 commit 4de4a63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Phug/DependencyInjectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,14 @@ public function testLongScenario()
$expiration = $dependencies->call('expiration');
$after = new DateTimeImmutable('now + 42 days');

self::assertLessThan($after, $expiration);
self::assertGreaterThan($before, $expiration);
self::assertLessThanOrEqual($after, $expiration);
self::assertGreaterThanOrEqual($before, $expiration);

$before = new DateTimeImmutable('now + 22 days');
$expiration = $dependencies->call('expiration', 20);
$after = new DateTimeImmutable('now + 22 days');

self::assertLessThan($after, $expiration);
self::assertGreaterThan($before, $expiration);
self::assertLessThanOrEqual($after, $expiration);
self::assertGreaterThanOrEqual($before, $expiration);
}
}

0 comments on commit 4de4a63

Please sign in to comment.