Skip to content

Commit 8955a22

Browse files
committed
Merge pull request #311 from fruux/fix-306-c
Added test case for #306.
2 parents ee2c033 + 3843882 commit 8955a22

File tree

3 files changed

+71
-4
lines changed

3 files changed

+71
-4
lines changed

ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ChangeLog
44
3.5.1 (????-??-??)
55
------------------
66

7-
* #306: When expanding recurring events, the first event should also have a
7+
* #309: When expanding recurring events, the first event should also have a
88
`RECURRENCE-ID` property.
99

1010

lib/ITip/Broker.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -807,9 +807,15 @@ protected function parseEventForAttendee(VCalendar $calendar, array $eventInfo,
807807
* 1. uid
808808
* 2. organizer
809809
* 3. organizerName
810-
* 4. attendees
811-
* 5. instances
812-
*
810+
* 4. organizerScheduleAgent
811+
* 5. organizerForceSend
812+
* 6. instances
813+
* 7. attendees
814+
* 8. sequence
815+
* 9. exdate
816+
* 10. timezone
817+
* 11. significantChangeHash
818+
* 12. status
813819
* @param VCalendar $calendar
814820
* @return array
815821
*/

tests/VObject/ITip/BrokerProcessReplyTest.php

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,67 @@ function testReplyAcceptUpdateRSVP() {
426426
ORGANIZER:mailto:bar@example.org
427427
END:VEVENT
428428
END:VCALENDAR
429+
ICS;
430+
431+
$result = $this->process($itip, $old, $expected);
432+
433+
}
434+
435+
function testReplyNewExceptionFirstOccurence() {
436+
437+
// This is a reply to 1 instance of a recurring event. This should
438+
// automatically create an exception.
439+
$itip = <<<ICS
440+
BEGIN:VCALENDAR
441+
VERSION:2.0
442+
METHOD:REPLY
443+
BEGIN:VEVENT
444+
ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org
445+
ORGANIZER:mailto:bar@example.org
446+
SEQUENCE:2
447+
RECURRENCE-ID:20140724T000000Z
448+
UID:foobar
449+
END:VEVENT
450+
END:VCALENDAR
451+
ICS;
452+
453+
$old = <<<ICS
454+
BEGIN:VCALENDAR
455+
VERSION:2.0
456+
BEGIN:VEVENT
457+
SEQUENCE:2
458+
UID:foobar
459+
RRULE:FREQ=DAILY
460+
DTSTART:20140724T000000Z
461+
DTEND:20140724T010000Z
462+
ATTENDEE:mailto:foo@example.org
463+
ORGANIZER:mailto:bar@example.org
464+
END:VEVENT
465+
END:VCALENDAR
466+
ICS;
467+
468+
$expected = <<<ICS
469+
BEGIN:VCALENDAR
470+
VERSION:2.0
471+
BEGIN:VEVENT
472+
SEQUENCE:2
473+
UID:foobar
474+
RRULE:FREQ=DAILY
475+
DTSTART:20140724T000000Z
476+
DTEND:20140724T010000Z
477+
ATTENDEE:mailto:foo@example.org
478+
ORGANIZER:mailto:bar@example.org
479+
END:VEVENT
480+
BEGIN:VEVENT
481+
SEQUENCE:2
482+
UID:foobar
483+
DTSTART:20140724T000000Z
484+
DTEND:20140724T010000Z
485+
ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org
486+
ORGANIZER:mailto:bar@example.org
487+
RECURRENCE-ID:20140724T000000Z
488+
END:VEVENT
489+
END:VCALENDAR
429490
ICS;
430491

431492
$result = $this->process($itip, $old, $expected);

0 commit comments

Comments
 (0)