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