[Pkg-owncloud-commits] [php-sabre-vobject] 132/341: Add tests for Section 5 of RFC6321.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit 907b586e6f3e2c576e374d57a39e117debcb0b7f
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Wed Jan 14 17:14:43 2015 +0100

    Add tests for Section 5 of RFC6321.
---
 tests/VObject/Parser/XmlTest.php | 48 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index 2499758..58924dd 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -923,6 +923,54 @@ XML
 
     }
 
+    /**
+     * Handling Unrecognized Properties or Parameters.
+     */
+    function testRFC6321Section5() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <x-property>
+                <unknown>20110512T120000Z</unknown>
+               </x-property>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'X-PROPERTY:20110512T120000Z' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <dtstart>
+                <parameters>
+                 <x-param><unknown>PT30M</unknown></x-param>
+                </parameters>
+                <date-time>2011-05-12T13:00:00Z</date-time>
+               </dtstart>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'DTSTART;X-PARAM=PT30M:20110512T130000Z' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+    }
+
     protected function assertXCalEqualsToICal($xcal, $ical) {
 
         $component = VObject\Reader::readXML($xcal);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list