From a6319b7dd20318e2578031ef847492a9c1cd9af8 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Mon, 15 Jan 2024 15:16:06 +0100 Subject: [PATCH] Add tests --- .../Telemetry/GarbageCollectorStatusTest.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/unit/Event/Value/Telemetry/GarbageCollectorStatusTest.php b/tests/unit/Event/Value/Telemetry/GarbageCollectorStatusTest.php index d962c717d65..436f24ff7c8 100644 --- a/tests/unit/Event/Value/Telemetry/GarbageCollectorStatusTest.php +++ b/tests/unit/Event/Value/Telemetry/GarbageCollectorStatusTest.php @@ -88,6 +88,34 @@ public function testMayNotHaveExtendedInformation(): void $this->assertFalse($this->withoutDetails()->hasExtendedInformation()); } + public function testMayNotHaveApplicationTime(): void + { + $this->expectException(RuntimeException::class); + + $this->withoutDetails()->applicationTime(); + } + + public function testMayNotHaveCollectorTime(): void + { + $this->expectException(RuntimeException::class); + + $this->withoutDetails()->collectorTime(); + } + + public function testMayNotHaveDestructorTime(): void + { + $this->expectException(RuntimeException::class); + + $this->withoutDetails()->destructorTime(); + } + + public function testMayNotHaveFreeTime(): void + { + $this->expectException(RuntimeException::class); + + $this->withoutDetails()->freeTime(); + } + public function testMayNotHaveRunning(): void { $this->expectException(RuntimeException::class);