1<?php 2 3namespace Sabre\CardDAV\Xml\Property; 4 5use Sabre\CardDAV; 6use Sabre\DAV; 7 8class SupportedAddressDataDataTest extends DAV\Xml\XmlTest { 9 10 function testSimple() { 11 12 $property = new SupportedAddressData(); 13 $this->assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedAddressData', $property); 14 15 } 16 17 /** 18 * @depends testSimple 19 */ 20 function testSerialize() { 21 22 $property = new SupportedAddressData(); 23 24 $this->namespaceMap[CardDAV\Plugin::NS_CARDDAV] = 'card'; 25 $xml = $this->write(['{DAV:}root' => $property]); 26 27 $this->assertXmlStringEqualsXmlString( 28'<?xml version="1.0"?> 29<d:root xmlns:card="' . CardDAV\Plugin::NS_CARDDAV . '" xmlns:d="DAV:">' . 30'<card:address-data-type content-type="text/vcard" version="3.0"/>' . 31'<card:address-data-type content-type="text/vcard" version="4.0"/>' . 32'<card:address-data-type content-type="application/vcard+json" version="4.0"/>' . 33'</d:root> 34', $xml); 35 36 } 37 38} 39