expectException(Exception::class); $this->expectExceptionMessage('dummy is an invalid index'); Guard::argumentIsValidIndex(10, 10, "dummy"); } public function testargumentIsValidIndex2(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('dummy is an invalid index'); Guard::argumentIsValidIndex(-1, 10, "dummy"); } public function testargumentInRangeInclusive(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('dummy is not in the valid range [0, 100]'); Guard::argumentInRangeInclusive(101, 0, 100, "dummy"); } }