adds a test for '@' in ics UIDs
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 12 Dec 2016 14:19:24 +0000 (15:19 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 13 Dec 2016 10:41:46 +0000 (11:41 +0100)
Change-Id: I7d19c606c61db6939fa7a4eaeb46a5e50a6240aa
Reviewed-on: http://gerrit.tine20.com/customers/3951
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Calendar/Convert/Event/VCalendar/GenericTest.php
tests/tine20/Calendar/Import/files/simple_at_in_id.ics [new file with mode: 0644]

index 2597e89..27663c2 100644 (file)
@@ -772,4 +772,15 @@ class Calendar_Convert_Event_VCalendar_GenericTest extends PHPUnit_Framework_Tes
             $this->assertEquals('Bad Timezone: AWSTTTT', $terv->getMessage());
         }
     }
+
+    /**
+     * testConvertWithAtInUid
+     */
+    public function testConvertWithAtInUid()
+    {
+        $savedEvent = $this->_saveIcsEvent('simple_at_in_id.ics', Calendar_Convert_Event_VCalendar_Factory::CLIENT_THUNDERBIRD);
+
+        $ics = $this->_converter->fromTine20Model($savedEvent);
+        self::assertContains('UID:5aaratdeecgjat4cbjpif5dvms@google', $ics->serialize());
+    }
 }
diff --git a/tests/tine20/Calendar/Import/files/simple_at_in_id.ics b/tests/tine20/Calendar/Import/files/simple_at_in_id.ics
new file mode 100644 (file)
index 0000000..c15e35f
--- /dev/null
@@ -0,0 +1,19 @@
+BEGIN:VCALENDAR\r
+PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN\r
+VERSION:2.0\r
+METHOD:PUBLISH\r
+BEGIN:VEVENT\r
+CLASS:PUBLIC\r
+CREATED:20081105T104258Z\r
+DESCRIPTION:A discussion with Tyler about how everything is over coffee\r
+  and donuts. I imagine we'll probably talk about our personal projects.\r
+DTEND:20081105T160000Z\r
+DTSTAMP:20081105T104200Z\r
+DTSTART:20081105T150000Z\r
+LAST-MODIFIED:20081105T104258Z\r
+SEQUENCE:0\r
+SUMMARY:Meeting with Tyler at Starbucks\r
+TRANSP:OPAQUE\r
+UID:5aaratdeecgjat4cbjpif5dvms@google\r
+END:VEVENT\r
+END:VCALENDAR\r