From f34b09ab995ada9eb402fcbbe3c7d05967e1ac8e Mon Sep 17 00:00:00 2001 From: Christian Kolb Date: Mon, 6 May 2024 08:32:10 +0200 Subject: [PATCH] Extend tests to cover mutants --- tests/Clock/FrozenClockTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Clock/FrozenClockTest.php b/tests/Clock/FrozenClockTest.php index 1def786..14bbf81 100644 --- a/tests/Clock/FrozenClockTest.php +++ b/tests/Clock/FrozenClockTest.php @@ -12,6 +12,19 @@ #[CoversClass(FrozenClock::class)] final class FrozenClockTest extends TestCase { + #[Test] + public function construction_works(): void + { + // -- Arrange + $moment = Moment::fromStringInTimeZone('2024-05-06 08:00:00', new \DateTimeZone('Europe/Berlin')); + + // -- Act + $clock = new FrozenClock($moment); + + // -- Assert + self::assertSame($moment, $clock->now()); + } + #[Test] public function freeze_works(): void {