1<?php 2 3namespace Sabre\CalDAV\Xml\Property; 4 5use Sabre\CalDAV; 6use Sabre\DAV; 7 8class AllowedSharingModesTest extends DAV\Xml\XmlTest { 9 10 function testSimple() { 11 12 $sccs = new AllowedSharingModes(true,true); 13 $this->assertInstanceOf('Sabre\CalDAV\Xml\Property\AllowedSharingModes', $sccs); 14 15 } 16 17 /** 18 * @depends testSimple 19 */ 20 function testSerialize() { 21 22 $property = new AllowedSharingModes(true,true); 23 24 $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal'; 25 $this->namespaceMap[CalDAV\Plugin::NS_CALENDARSERVER] = 'cs'; 26 $xml = $this->write(['{DAV:}root' => $property]); 27 28 $this->assertXmlStringEqualsXmlString( 29'<?xml version="1.0"?> 30 <d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '" xmlns:cs="' . CalDAV\Plugin::NS_CALENDARSERVER . '"> 31 <cs:can-be-shared/> 32 <cs:can-be-published/> 33</d:root> 34', $xml); 35 36 } 37 38} 39