ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PluginTest.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
8 
9  function testInit() {
10 
11  $server = new \Sabre\DAV\Server();
12  $plugin = new Plugin();
13 
14  $server->addPlugin($plugin);
15 
16  $this->assertEquals(
17  '{http://calendarserver.org/ns/}subscribed',
18  $server->resourceTypeMapping['Sabre\\CalDAV\\Subscriptions\\ISubscription']
19  );
20  $this->assertEquals(
21  'Sabre\\DAV\\Xml\\Property\\Href',
22  $server->xml->elementMap['{http://calendarserver.org/ns/}source']
23  );
24 
25  $this->assertEquals(
26  ['calendarserver-subscribed'],
27  $plugin->getFeatures()
28  );
29 
30  $this->assertEquals(
31  'subscriptions',
32  $plugin->getPluginInfo()['name']
33  );
34 
35  }
36 
37  function testPropFind() {
38 
39  $propName = '{http://calendarserver.org/ns/}subscribed-strip-alarms';
40  $propFind = new PropFind('foo', [$propName]);
41  $propFind->set($propName, null, 200);
42 
43  $plugin = new Plugin();
44  $plugin->propFind($propFind, new \Sabre\DAV\SimpleCollection('hi'));
45 
46  $this->assertFalse(is_null($propFind->get($propName)));
47 
48  }
49 
50 }
CalDAV plugin.
Definition: Plugin.php:28
This class holds all the information about a PROPFIND request.
Definition: PropFind.php:11