ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AllowedSharingModesTest.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use Sabre\CalDAV;
6 use Sabre\DAV;
7 
9 
10  function testSimple() {
11 
12  $sccs = new AllowedSharingModes(true, true);
13  $this->assertInstanceOf('Sabre\CalDAV\Xml\Property\AllowedSharingModes', $sccs);
14 
15  }
16 
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 }
const NS_CALENDARSERVER
This is the namespace for the proprietary calendarserver extensions.
Definition: Plugin.php:38
const NS_CALDAV
This is the official CalDAV namespace.
Definition: Plugin.php:33