[Pkg-owncloud-commits] [php-sabre-vobject] 221/341: Add tests for Section 6.4 of RFC6350.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:50 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 e205723f55494b0640aa5ee815320771190fdaf8
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Tue Jan 27 11:31:01 2015 +0100
Add tests for Section 6.4 of RFC6350.
---
tests/VObject/Parser/XmlTest.php | 111 +++++++++++++++++++++++++++++++++++++++
1 file changed, 111 insertions(+)
diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index 26401f8..23982bb 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -1505,6 +1505,117 @@ XML
}
+ function testRFC6350Section6_4_1() {
+
+ $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+ <tel>
+ <parameters>
+ <type>
+ <text>home</text>
+ </type>
+ </parameters>
+ <uri>tel:+33-01-23-45-67</uri>
+ </tel>
+ </vcard>
+</vcards>
+XML
+,
+ 'BEGIN:VCARD' . CRLF .
+ 'VERSION:4.0' . CRLF .
+ 'TEL;TYPE=home:tel:+33-01-23-45-67' . CRLF .
+ 'END:VCARD' . CRLF
+ );
+
+ }
+
+ function testRFC6350Section6_4_2() {
+
+ $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+ <email>
+ <parameters>
+ <type>
+ <text>work</text>
+ </type>
+ </parameters>
+ <text>jqpublic at xyz.example.com</text>
+ </email>
+ </vcard>
+</vcards>
+XML
+,
+ 'BEGIN:VCARD' . CRLF .
+ 'VERSION:4.0' . CRLF .
+ 'EMAIL;TYPE=work:jqpublic at xyz.example.com' . CRLF .
+ 'END:VCARD' . CRLF
+ );
+
+ }
+
+ function testRFC6350Section6_4_3() {
+
+ $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+ <impp>
+ <parameters>
+ <pref>
+ <text>1</text>
+ </pref>
+ </parameters>
+ <uri>xmpp:alice at example.com</uri>
+ </impp>
+ </vcard>
+</vcards>
+XML
+,
+ 'BEGIN:VCARD' . CRLF .
+ 'VERSION:4.0' . CRLF .
+ 'IMPP;PREF=1:xmpp:alice at example.com' . CRLF .
+ 'END:VCARD' . CRLF
+ );
+
+ }
+
+ function testRFC6350Section6_4_4() {
+
+ $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+ <lang>
+ <parameters>
+ <type>
+ <text>work</text>
+ </type>
+ <pref>
+ <text>2</text>
+ </pref>
+ </parameters>
+ <language-tag>en</language-tag>
+ </lang>
+ </vcard>
+</vcards>
+XML
+,
+ 'BEGIN:VCARD' . CRLF .
+ 'VERSION:4.0' . CRLF .
+ 'LANG;TYPE=work;PREF=2:en' . 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