3 class Sabre_CalDAV_Backend_AbstractTest extends PHPUnit_Framework_TestCase {
5 function testUpdateCalendar() {
7 $abstract = new Sabre_CalDAV_Backend_AbstractMock();
8 $this->assertEquals(false, $abstract->updateCalendar('randomid', array('{DAV:}displayname' => 'anything')));
12 function testCalendarQuery() {
14 $abstract = new Sabre_CalDAV_Backend_AbstractMock();
16 'name' => 'VCALENDAR',
17 'comp-filters' => array(
20 'comp-filters' => array(),
21 'prop-filters' => array(),
22 'is-not-defined' => false,
26 'prop-filters' => array(),
27 'is-not-defined' => false,
31 $this->assertEquals(array(
33 ), $abstract->calendarQuery(1, $filters));
39 class Sabre_CalDAV_Backend_AbstractMock extends Sabre_CalDAV_Backend_Abstract {
41 function getCalendarsForUser($principalUri) { }
42 function createCalendar($principalUri,$calendarUri,array $properties) { }
43 function deleteCalendar($calendarId) { }
44 function getCalendarObjects($calendarId) {
50 'uri' => 'event1.ics',
60 function getCalendarObject($calendarId,$objectUri) {
68 'uri' => 'event1.ics',
69 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n",
75 'uri' => 'event1.ics',
76 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n",
82 function createCalendarObject($calendarId,$objectUri,$calendarData) { }
83 function updateCalendarObject($calendarId,$objectUri,$calendarData) { }
84 function deleteCalendarObject($calendarId,$objectUri) { }