expectException(Exception\InvariantViolationException::class); Str\slice('Hello', 0, -1); } public function testSliceThrowsForOutOfBoundOffset(): void { $this->expectException(Exception\InvariantViolationException::class); Str\slice('Hello', 10); } public function testSliceThrowsForNegativeOutOfBoundOffset(): void { $this->expectException(Exception\InvariantViolationException::class); Str\slice('hello', -6); } }