Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117769209
D4887.1775235952.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D4887.1775235952.diff
View Options
diff --git a/src/tests/Infrastructure/DavTest.php b/src/tests/Infrastructure/DavTest.php
--- a/src/tests/Infrastructure/DavTest.php
+++ b/src/tests/Infrastructure/DavTest.php
@@ -2,6 +2,7 @@
namespace Tests\Infrastructure;
+use App\Backends\DAV;
use Tests\TestCase;
/**
@@ -201,6 +202,64 @@
$this->assertStringContainsString("<d:href>$href</d:href>", $data);
}
+ /**
+ * Test calendar event creation
+ */
+ public function testCalendarEventsCreation(): void
+ {
+ $email = $this->user->email;
+ $vevent = <<<EOF
+ BEGIN:VCALENDAR
+ METHOD:PUBLISH
+ PRODID:Microsoft Exchange Server 2010
+ VERSION:2.0
+ BEGIN:VTIMEZONE
+ TZID:Central European Standard Time
+ BEGIN:STANDARD
+ DTSTART:16010101T030000
+ TZOFFSETFROM:+0200
+ TZOFFSETTO:+0100
+ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+ END:STANDARD
+ BEGIN:DAYLIGHT
+ DTSTART:16010101T020000
+ TZOFFSETFROM:+0100
+ TZOFFSETTO:+0200
+ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+ END:DAYLIGHT
+ END:VTIMEZONE
+ BEGIN:VEVENT
+ ORGANIZER;CN=Aleksander Machniak:mailto:{$email}
+ ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Aleksander
+ Machniak:mailto:test@kolab.org
+ ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Alec Machn
+ iak:mailto:alec@outlook.com
+ DESCRIPTION:*test to ms*
+ UID:1F3C13D7E99642A75ABE23D50487B454-8FE68B2E68E1B348
+ SUMMARY:test to ms
+ DTSTART;TZID=Central European Standard Time:20231121T120000
+ DTEND;TZID=Central European Standard Time:20231121T123000
+ CLASS:PUBLIC
+ PRIORITY:5
+ DTSTAMP:20231120T145005Z
+ TRANSP:OPAQUE
+ STATUS:CONFIRMED
+ SEQUENCE:0
+ END:VEVENT
+ END:VCALENDAR
+ EOF;
+
+ $event = new DAV\Opaque(str_replace("\n", "\r\n", $vevent));
+ $event->contentType = 'text/calendar; charset=utf-8';
+ $event->href = "calendars/user/{$email}/Default/1F3C13D7E99642A75ABE23D50487B454-8FE68B2E68E1B348.ics";
+
+ $dav = new DAV($this->user->email, 'simple123');
+
+ // The error that does not make sense (on Cyrus DAV) is 403 with this in the XML body:
+ // Failed iTIP restrictions for ATTENDEE property. Expected 0 instances of the property and got 2.
+ $this->assertTrue($dav->create($event) !== false);
+ }
+
/**
* Thunderbird does this and relies on the WWW-Authenticate header response to
* start sending authenticated requests.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 5:05 PM (1 d, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18824989
Default Alt Text
D4887.1775235952.diff (2 KB)
Attached To
Mode
D4887: A test to investigate Cyrus DAV issue
Attached
Detach File
Event Timeline