1<?php
2
3namespace Sabre\CalDAV\Schedule;
4
5class PluginBasicTest extends \Sabre\DAVServerTest {
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        $this->assertEquals(['calendar-auto-schedule'], $plugin->getFeatures());
24
25    }
26
27    function testGetHTTPMethods() {
28
29        $this->assertEquals([], $this->caldavSchedulePlugin->getHTTPMethods('notfound'));
30        $this->assertEquals([], $this->caldavSchedulePlugin->getHTTPMethods('calendars/user1'));
31        $this->assertEquals(['POST'], $this->caldavSchedulePlugin->getHTTPMethods('calendars/user1/outbox'));
32
33    }
34
35}
36