1<?php 2 3namespace Sabre\CardDAV\Xml\Property; 4 5use Sabre\CardDAV; 6use Sabre\DAV; 7 8class SupportedCollationSetTest extends DAV\Xml\XmlTest { 9 10 function testSimple() { 11 12 $property = new SupportedCollationSet(); 13 $this->assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedCollationSet', $property); 14 15 } 16 17 /** 18 * @depends testSimple 19 */ 20 function testSerialize() { 21 22 $property = new SupportedCollationSet(); 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:supported-collation>i;ascii-casemap</card:supported-collation>' . 31'<card:supported-collation>i;octet</card:supported-collation>' . 32'<card:supported-collation>i;unicode-casemap</card:supported-collation>' . 33'</d:root> 34', $xml); 35 36 } 37 38} 39