[Pkg-owncloud-commits] [php-sabredav] 167/275: Fixed a few content-type related tests.

David Prévot taffit at moszumanska.debian.org
Thu Sep 25 14:56:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 6393f839767aa6fac9a2ad31a1b11febe2730c91
Author: Evert Pot <me at evertpot.com>
Date:   Thu Aug 21 14:54:35 2014 -0400

    Fixed a few content-type related tests.
---
 lib/CardDAV/Plugin.php                           | 2 +-
 tests/Sabre/CardDAV/CardTest.php                 | 2 +-
 tests/Sabre/CardDAV/SogoStripContentTypeTest.php | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/CardDAV/Plugin.php b/lib/CardDAV/Plugin.php
index 096f5e8..f8fa5fe 100644
--- a/lib/CardDAV/Plugin.php
+++ b/lib/CardDAV/Plugin.php
@@ -679,7 +679,7 @@ class Plugin extends DAV\ServerPlugin {
         }
         $contentType = $propFind->get('{DAV:}getcontenttype');
         list($part) = explode(';', $contentType);
-        if ($part === 'text/x-vcard' || $contentType === 'text/vcard') {
+        if ($part === 'text/x-vcard' || $part === 'text/vcard') {
             $propFind->set('{DAV:}getcontenttype', 'text/x-vcard');
         }
 
diff --git a/tests/Sabre/CardDAV/CardTest.php b/tests/Sabre/CardDAV/CardTest.php
index 25afa54..cf8dbab 100644
--- a/tests/Sabre/CardDAV/CardTest.php
+++ b/tests/Sabre/CardDAV/CardTest.php
@@ -82,7 +82,7 @@ class CardTest extends \PHPUnit_Framework_TestCase {
 
     function testGetContentType() {
 
-        $this->assertEquals('text/x-vcard; charset=utf-8', $this->card->getContentType());
+        $this->assertEquals('text/vcard; charset=utf-8', $this->card->getContentType());
 
     }
 
diff --git a/tests/Sabre/CardDAV/SogoStripContentTypeTest.php b/tests/Sabre/CardDAV/SogoStripContentTypeTest.php
index bbfa214..f828cc2 100644
--- a/tests/Sabre/CardDAV/SogoStripContentTypeTest.php
+++ b/tests/Sabre/CardDAV/SogoStripContentTypeTest.php
@@ -25,7 +25,7 @@ class SogoStripContentType extends \Sabre\DAVServerTest {
 
         $result = $this->server->getProperties('addressbooks/user1/book1/card1.vcf',array('{DAV:}getcontenttype'));
         $this->assertEquals(array(
-            '{DAV:}getcontenttype' => 'text/x-vcard; charset=utf-8'
+            '{DAV:}getcontenttype' => 'text/vcard; charset=utf-8'
         ), $result);
 
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list