ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PluginBasicTest.php
Go to the documentation of this file.
1<?php
2
4
6
7 public $setupCalDAV = true;
8 public $setupCalDAVScheduling = true;
9
10 function testSimple() {
11
12 $plugin = new Plugin();
13 $this->assertEquals(
14 'caldav-schedule',
15 $plugin->getPluginInfo()['name']
16 );
17
18 }
19
20 function testOptions() {
21
22 $plugin = new Plugin();
23 $expected = [
24 'calendar-auto-schedule',
25 'calendar-availability',
26 ];
27 $this->assertEquals($expected, $plugin->getFeatures());
28
29 }
30
31 function testGetHTTPMethods() {
32
33 $this->assertEquals([], $this->caldavSchedulePlugin->getHTTPMethods('notfound'));
34 $this->assertEquals([], $this->caldavSchedulePlugin->getHTTPMethods('calendars/user1'));
35 $this->assertEquals(['POST'], $this->caldavSchedulePlugin->getHTTPMethods('calendars/user1/outbox'));
36
37 }
38
39}
An exception for terminatinating execution or to throw for unit testing.
CalDAV plugin.
Definition: Plugin.php:28
This class may be used as a basis for other webdav-related unittests.