]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/tests/Sabre/CalDAV/Property/SupportedCalendarDataTest.php
Initial Release of the calendar plugin
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / CalDAV / Property / SupportedCalendarDataTest.php
1 <?php
2
3 class Sabre_CalDAV_Property_SupportedCalendarDataTest extends PHPUnit_Framework_TestCase {
4
5     function testSimple() {
6
7         $sccs = new Sabre_CalDAV_Property_SupportedCalendarData();
8
9     }
10
11     /**
12      * @depends testSimple
13      */
14     function testSerialize() {
15
16         $property = new Sabre_CalDAV_Property_SupportedCalendarData();
17
18         $doc = new DOMDocument();
19         $root = $doc->createElement('d:root');
20         $root->setAttribute('xmlns:d','DAV:');
21         $root->setAttribute('xmlns:cal',Sabre_CalDAV_Plugin::NS_CALDAV);
22
23         $doc->appendChild($root);
24         $objectTree = new Sabre_DAV_ObjectTree(new Sabre_DAV_SimpleCollection('rootdir'));
25         $server = new Sabre_DAV_Server($objectTree);
26
27         $property->serialize($server, $root);
28
29         $xml = $doc->saveXML();
30
31         $this->assertEquals(
32 '<?xml version="1.0"?>
33 <d:root xmlns:d="DAV:" xmlns:cal="' . Sabre_CalDAV_Plugin::NS_CALDAV . '">' .
34 '<cal:calendar-data content-type="text/calendar" version="2.0"/>' .
35 '</d:root>
36 ', $xml);
37
38     }
39
40 }