expectException(\InvalidArgumentException::class); Loop::delay(-1, function () {}); } public function testRepeatWithNegativeInterval() { $this->expectException(\InvalidArgumentException::class); Loop::repeat(-1, function () {}); } }