[Pkg-owncloud-commits] [php-sabre-vobject] 131/341: Add tests for 3.6.13 and 3.6.14 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 40706c5cf387c0c79e7237a01c2dd1d88b6f3ad1
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Wed Jan 14 17:11:50 2015 +0100

    Add tests for 3.6.13 and 3.6.14 of RFC6321.
---
 tests/VObject/Parser/XmlTest.php | 73 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index a45ddd4..2499758 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -850,6 +850,79 @@ XML
 
     }
 
+    /**
+     * Values, URI.
+     */
+    function testRFC6321Section3_6_13() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <attach>
+                <uri>http://calendar.example.com</uri>
+               </attach>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'ATTACH:http://calendar.example.com' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+    }
+
+    /**
+     * Values, UTC Offset.
+     */
+    function testRFC6321Section3_6_14() {
+
+        // Example 1 of RFC5545, Section 3.3.14.
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <tzoffsetfrom>
+                <utc-offset>-05:00</utc-offset>
+               </tzoffsetfrom>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'TZOFFSETFROM:-0500' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+        // Example 2 of RFC5545, Section 3.3.14.
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <tzoffsetfrom>
+                <utc-offset>+01:00</utc-offset>
+               </tzoffsetfrom>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'TZOFFSETFROM:+0100' . 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