[Pkg-owncloud-commits] [php-sabre-vobject] 237/341: Add tests for Section 6.9 and A.3 of RFC6350.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:52 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 a43cf9bf210666fec672d5b2bdf1bb73f89d088c
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Tue Jan 27 15:28:13 2015 +0100

    Add tests for Section 6.9 and A.3 of RFC6350.
---
 tests/VObject/Parser/XmlTest.php | 99 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)

diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index a80611e..20ae395 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -2030,6 +2030,105 @@ XML
         );
 
     }
+
+    function testRFC6350Section6_9_1() {
+
+        $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+  <fburl>
+   <parameters>
+    <pref>
+     <text>1</text>
+    </pref>
+   </parameters>
+   <uri>http://www.example.com/busy/janedoe</uri>
+  </fburl>
+ </vcard>
+</vcards>
+XML
+,
+            'BEGIN:VCARD' . CRLF .
+            'VERSION:4.0' . CRLF .
+            'FBURL;PREF=1:http://www.example.com/busy/janedoe' . CRLF .
+            'END:VCARD' . CRLF
+        );
+
+    }
+
+    function testRFC6350Section6_9_2() {
+
+        $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+  <caladruri>
+   <uri>http://example.com/calendar/jdoe</uri>
+  </caladruri>
+ </vcard>
+</vcards>
+XML
+,
+            'BEGIN:VCARD' . CRLF .
+            'VERSION:4.0' . CRLF .
+            'CALADRURI:http://example.com/calendar/jdoe' . CRLF .
+            'END:VCARD' . CRLF
+        );
+
+    }
+
+    function testRFC6350Section6_9_3() {
+
+        $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+  <caluri>
+   <parameters>
+    <pref>
+     <text>1</text>
+    </pref>
+   </parameters>
+   <uri>http://cal.example.com/calA</uri>
+  </caluri>
+ </vcard>
+</vcards>
+XML
+,
+            'BEGIN:VCARD' . CRLF .
+            'VERSION:4.0' . CRLF .
+            'CALURI;PREF=1:http://cal.example.com/calA' . CRLF .
+            'END:VCARD' . CRLF
+        );
+
+    }
+
+    function testRFC6350SectionA_3() {
+
+        $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+  <capuri>
+   <uri>http://cap.example.com/capA</uri>
+  </capuri>
+ </vcard>
+</vcards>
+XML
+,
+            'BEGIN:VCARD' . CRLF .
+            'VERSION:4.0' . CRLF .
+            'CAPURI:http://cap.example.com/capA' . CRLF .
+            'END:VCARD' . CRLF
+        );
+
+    }
+
     /**
      * Check this equality:
      *     XML -> object model -> MIME Dir.

-- 
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