3 class Sabre_CardDAV_SogoStripContentType extends Sabre_DAVServerTest {
5 protected $setupCardDAV = true;
6 protected $carddavAddressBooks = array(
10 'principaluri' => 'principals/user1',
13 protected $carddavCards = array(
15 'card1.vcf' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD",
19 function testDontStrip() {
21 $result = $this->server->getProperties('addressbooks/user1/book1/card1.vcf',array('{DAV:}getcontenttype'));
22 $this->assertEquals(array(
23 '{DAV:}getcontenttype' => 'text/x-vcard; charset=utf-8'
27 function testStrip() {
29 $this->server->httpRequest = new Sabre_HTTP_Request(array(
30 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 Lightning/1.2.1',
32 $result = $this->server->getProperties('addressbooks/user1/book1/card1.vcf',array('{DAV:}getcontenttype'));
33 $this->assertEquals(array(
34 '{DAV:}getcontenttype' => 'text/x-vcard'