[Pkg-owncloud-commits] [php-sabre-vobject] 128/341: Add tests for 3.6.10, 3.6.11 and 3.6.12 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 614569a33ab525c0f183b2012ce9be2235074e38
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Wed Jan 14 16:52:56 2015 +0100

    Add tests for 3.6.10, 3.6.11 and 3.6.12 of RFC6321.
---
 tests/VObject/Parser/XmlTest.php | 83 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index bf14844..a45ddd4 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -767,6 +767,89 @@ XML
 
     }
 
+    /**
+     * Values, Recurrence Rule.
+     */
+    function testRFC6321Section3_6_10() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <rrule>
+                <recur>
+                 <freq>YEARLY</freq>
+                 <count>5</count>
+                 <byday>-1SU</byday>
+                 <bymonth>10</bymonth>
+                </recur>
+               </rrule>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'RRULE:FREQ=YEARLY;COUNT=5;BYDAY=-1SU;BYMONTH=10' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+    }
+
+    /**
+     * Values, Text.
+     */
+    function testRFC6321Section3_6_11() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <calscale>
+                <text>GREGORIAN</text>
+               </calscale>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'CALSCALE:GREGORIAN' . CRLF .
+            'END:VCALENDAR' . CRLF
+        );
+
+    }
+
+    /**
+     * Values, Time.
+     */
+    function testRFC6321Section3_6_12() {
+
+        $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+            <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+             <vcalendar>
+              <properties>
+               <foo>
+                <time>12:00:00</time>
+               </foo>
+              </properties>
+             </vcalendar>
+            </icalendar>
+XML
+,
+            'BEGIN:VCALENDAR' . CRLF .
+            'FOO:120000' . 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