[Pkg-owncloud-commits] [php-sabre-vobject] 251/341: TEL and GEO is of type TEXT by default, URI in vCard4.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:53 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 4f7c0ef09b5313973c53b8df402e1d00a4d00acc
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Thu Jan 29 11:25:45 2015 +0100

    TEL and GEO is of type TEXT by default, URI in vCard4.
---
 lib/Component/VCard.php          |  4 ++--
 tests/VObject/Parser/XmlTest.php | 24 +++++++++++++++++++++---
 2 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/lib/Component/VCard.php b/lib/Component/VCard.php
index a9666e6..16d512f 100644
--- a/lib/Component/VCard.php
+++ b/lib/Component/VCard.php
@@ -72,10 +72,10 @@ class VCard extends VObject\Document {
         'BDAY'    => 'Sabre\\VObject\\Property\\VCard\\DateAndOrTime',
         'ADR'     => 'Sabre\\VObject\\Property\\Text',
         'LABEL'   => 'Sabre\\VObject\\Property\\FlatText', // Removed in vCard 4.0
-        'TEL'     => 'Sabre\\VObject\\Property\\Uri',
+        'TEL'     => 'Sabre\\VObject\\Property\\FlatText',
         'EMAIL'   => 'Sabre\\VObject\\Property\\FlatText',
         'MAILER'  => 'Sabre\\VObject\\Property\\FlatText', // Removed in vCard 4.0
-        'GEO'     => 'Sabre\\VObject\\Property\\Uri',
+        'GEO'     => 'Sabre\\VObject\\Property\\FlatText',
         'TITLE'   => 'Sabre\\VObject\\Property\\FlatText',
         'ROLE'    => 'Sabre\\VObject\\Property\\FlatText',
         'LOGO'    => 'Sabre\\VObject\\Property\\Binary',
diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index 555a436..cd92ccd 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -1253,14 +1253,14 @@ XML
 <vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
  <vcard>
   <tel>
-   <uri>tel:+1-555-555-556</uri>
+   <text>tel:+1-555-555-556</text>
   </tel>
   <group name="contact">
    <fn>
     <text>Gordon</text>
    </fn>
    <tel>
-    <uri>tel:+1-555-555-555</uri>
+    <text>tel:+1-555-555-555</text>
    </tel>
   </group>
   <group name="media">
@@ -2264,7 +2264,7 @@ XML
      */
     function testRFC6350Section6_5_2() {
 
-        $this->assertXMLReflexivelyEqualsToMimeDir(
+        $this->assertXMLEqualsToMimeDir(
 <<<XML
 <?xml version="1.0" encoding="UTF-8"?>
 <vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
@@ -2282,6 +2282,24 @@ XML
             'END:VCARD' . CRLF
         );
 
+        $this->assertXMLReflexivelyEqualsToMimeDir(
+<<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
+ <vcard>
+  <geo>
+   <text>geo:37.386013,-122.082932</text>
+  </geo>
+ </vcard>
+</vcards>
+XML
+,
+            'BEGIN:VCARD' . CRLF .
+            'VERSION:4.0' . CRLF .
+            'GEO:geo:37.386013\,-122.082932' . CRLF .
+            'END:VCARD' . CRLF
+        );
+
     }
 
     /**

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