-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
358 Bugfix Broker::processMessageReply #651
Closed
phil-davis
wants to merge
1
commit into
sabre-io:master
from
phil-davis:358_bugfix_exception_process_message_reply_20240508
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -373,6 +373,129 @@ public function testReplyNewExceptionTz(): void | |
$this->process($itip, $old, $expected); | ||
} | ||
|
||
public function testReplyNewExceptionReccurenceIdInDifferentTz(): void | ||
{ | ||
// This is a reply to 1 instance of a recurring event. This should | ||
// automatically create an exception. | ||
$itip = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
METHOD:REPLY | ||
BEGIN:VEVENT | ||
ATTENDEE;PARTSTAT=ACCEPTED:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
SEQUENCE:2 | ||
RECURRENCE-ID;TZID=Asia/Ho_Chi_Minh:20140725T110000 | ||
UID:foobar | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$old = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
SEQUENCE:2 | ||
UID:foobar | ||
RRULE:FREQ=DAILY | ||
DTSTART;TZID=America/Toronto:20140724T000000 | ||
DTEND;TZID=America/Toronto:20140724T010000 | ||
ATTENDEE:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$expected = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
SEQUENCE:2 | ||
UID:foobar | ||
RRULE:FREQ=DAILY | ||
DTSTART;TZID=America/Toronto:20140724T000000 | ||
DTEND;TZID=America/Toronto:20140724T010000 | ||
ATTENDEE:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
END:VEVENT | ||
BEGIN:VEVENT | ||
SEQUENCE:2 | ||
UID:foobar | ||
DTSTART;TZID=America/Toronto:20140725T000000 | ||
DTEND;TZID=America/Toronto:20140725T010000 | ||
ATTENDEE;PARTSTAT=ACCEPTED:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
RECURRENCE-ID;TZID=America/Toronto:20140725T000000 | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$this->process($itip, $old, $expected); | ||
} | ||
|
||
/** | ||
* @group failing | ||
*/ | ||
public function testReplyNewExceptionReccurenceIdInUTC(): void | ||
{ | ||
// This is a reply to 1 instance of a recurring event. This should | ||
// automatically create an exception. | ||
Comment on lines
+441
to
+442
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand why this comment has "This should automatically create an exception." Similar to my other comment above, I don't expect any exception to happen. |
||
$itip = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
METHOD:REPLY | ||
BEGIN:VEVENT | ||
ATTENDEE;PARTSTAT=ACCEPTED:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
SEQUENCE:2 | ||
RECURRENCE-ID:20140725T040000Z | ||
UID:foobar | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$old = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
SEQUENCE:2 | ||
UID:foobar | ||
RRULE:FREQ=DAILY | ||
DTSTART;TZID=America/Toronto:20140724T000000 | ||
DTEND;TZID=America/Toronto:20140724T010000 | ||
ATTENDEE:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$expected = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
SEQUENCE:2 | ||
UID:foobar | ||
RRULE:FREQ=DAILY | ||
DTSTART;TZID=America/Toronto:20140724T000000 | ||
DTEND;TZID=America/Toronto:20140724T010000 | ||
ATTENDEE:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
END:VEVENT | ||
BEGIN:VEVENT | ||
SEQUENCE:2 | ||
UID:foobar | ||
DTSTART;TZID=America/Toronto:20140725T000000 | ||
DTEND;TZID=America/Toronto:20140725T010000 | ||
ATTENDEE;PARTSTAT=ACCEPTED:mailto:[email protected] | ||
ORGANIZER:mailto:[email protected] | ||
RECURRENCE-ID;TZID=America/Toronto:20140725T000000 | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$this->process($itip, $old, $expected); | ||
} | ||
|
||
public function testReplyPartyCrashCreateException(): void | ||
{ | ||
// IN this test there's a recurring event that has an exception. The | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this comment has "This should automatically create an exception."
The source code now handles this situation.
TZID=Asia/Ho_Chi_Minh:20140725T110000
is the event recurrence ofDTSTART;TZID=America/Toronto:20140724T000000
that happens the next day, 20140725.America/Toronto
is UTC-4,Asia/Ho_Chi_Minh
is UTC+7. So they are 11 hours apart.0000
in Toronto is the same time as1100
in Ho Chi Minh City.