[Pkg-owncloud-commits] [php-sabre-vobject] 120/341: Add tests for 3.6.1, 3.6.2 and 3.6.3 of RFC6321.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:40 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 b950568d5292460adf1be762e4df9cc665916676
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Wed Jan 14 15:39:20 2015 +0100

    Add tests for 3.6.1, 3.6.2 and 3.6.3 of RFC6321.
---
 tests/VObject/Parser/XmlTest.php | 81 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index a4aa1b4..8f13de6 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -471,6 +471,87 @@ XML
 
     }
 
+    /**
+     * Values, Binary.
+     */
+    function testRFC6321Section3_6_1() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <attach>
+                <binary>foobar</binary>
+               </attach>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'ATTACH:foobag==' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+    }
+
+    /**
+     * Values, Boolean.
+     */
+    function testRFC6321Section3_6_2() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <attendee>
+                <parameters>
+                 <rsvp><boolean>true</boolean></rsvp>
+                </parameters>
+                <cal-address>mailto:cyrus at example.com</cal-address>
+               </attendee>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'ATTENDEE;RSVP=true:mailto:cyrus at example.com' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+    }
+
+    /**
+     * Values, Calendar User Address.
+     */
+    function testRFC6321Section3_6_3() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <attendee>
+                <cal-address>mailto:cyrus at example.com</cal-address>
+               </attendee>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'ATTENDEE:mailto:cyrus at example.com' . 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