diff --git a/tests/Unit/Symfony/ClockTestTraitTest.php b/tests/Unit/Symfony/ClockTestTraitTest.php index 200b97b..431e263 100644 --- a/tests/Unit/Symfony/ClockTestTraitTest.php +++ b/tests/Unit/Symfony/ClockTestTraitTest.php @@ -4,6 +4,7 @@ namespace DR\PHPUnitExtensions\Tests\Unit\Symfony; +use DateTimeImmutable; use DR\PHPUnitExtensions\Symfony\ClockTestTrait; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; @@ -28,4 +29,14 @@ public function testSleep(): void self::sleep(123.456); self::assertSame(1634050698, self::time()); } + + public function testAssertNow(): void + { + self::assertNow((new DateTimeImmutable())->setTimestamp(1634050575)); + } + + public function testAssertTime(): void + { + self::assertSameTime(1634050575, self::now()); + } }