value)->toBe($raw) ->and((string) $ics)->toBe($raw); }); it('rejects empty ICS content', function (): void { // WHEN / THEN expect(fn (): IcsContent => new IcsContent(' ')) ->toThrow(\InvalidArgumentException::class); }); it('rejects ICS content missing BEGIN:VCALENDAR header', function (): void { // WHEN / THEN expect(fn (): IcsContent => new IcsContent("BEGIN:VEVENT\r\nEND:VCALENDAR")) ->toThrow(\InvalidArgumentException::class); }); it('rejects ICS content missing END:VCALENDAR footer', function (): void { // WHEN / THEN expect(fn (): IcsContent => new IcsContent("BEGIN:VCALENDAR\r\nBEGIN:VEVENT")) ->toThrow(\InvalidArgumentException::class); }); });