ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SupportedCalendarDataTest.php
Go to the documentation of this file.
1<?php
2
4
6use Sabre\DAV;
7
9
10 function testSimple() {
11
12 $sccs = new SupportedCalendarData();
13 $this->assertInstanceOf('Sabre\CalDAV\Xml\Property\SupportedCalendarData', $sccs);
14
15 }
16
20 function testSerialize() {
21
22 $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal';
23 $property = new SupportedCalendarData();
24
25 $xml = $this->write(['{DAV:}root' => $property]);
26
27 $this->assertXmlStringEqualsXmlString(
28'<?xml version="1.0"?>
29<d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '">
30<cal:calendar-data content-type="text/calendar" version="2.0"/>
31<cal:calendar-data content-type="application/calendar+json"/>
32</d:root>', $xml);
33
34 }
35
36}
An exception for terminatinating execution or to throw for unit testing.
const NS_CALDAV
This is the official CalDAV namespace.
Definition: Plugin.php:33