From 0b02a6d123b2014705998c94ddf3d460948d3eac Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 10 May 2016 17:26:44 -0700 Subject: initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import) --- .../dav/tests/Sabre/CalDAV/UserCalendarsTest.php | 207 --------------------- 1 file changed, 207 deletions(-) delete mode 100644 vendor/sabre/dav/tests/Sabre/CalDAV/UserCalendarsTest.php (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/UserCalendarsTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/UserCalendarsTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/UserCalendarsTest.php deleted file mode 100644 index 453c872e5..000000000 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/UserCalendarsTest.php +++ /dev/null @@ -1,207 +0,0 @@ -markTestSkipped('SQLite driver is not available'); - $this->backend = TestUtil::getBackend(); - $this->usercalendars = new UserCalendars($this->backend, array( - 'uri' => 'principals/user1' - )); - - } - - function testSimple() { - - $this->assertEquals('user1',$this->usercalendars->getName()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - * @depends testSimple - */ - function testGetChildNotFound() { - - $this->usercalendars->getChild('randomname'); - - } - - function testChildExists() { - - $this->assertFalse($this->usercalendars->childExists('foo')); - $this->assertTrue($this->usercalendars->childExists('UUID-123467')); - - } - - function testGetOwner() { - - $this->assertEquals('principals/user1', $this->usercalendars->getOwner()); - - } - - function testGetGroup() { - - $this->assertNull($this->usercalendars->getGroup()); - - } - - function testGetACL() { - - $expected = array( - array( - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1', - 'protected' => true, - ), - array( - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1', - 'protected' => true, - ), - array( - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ), - array( - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ), - array( - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ), - ); - $this->assertEquals($expected, $this->usercalendars->getACL()); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testSetACL() { - - $this->usercalendars->setACL(array()); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - * @depends testSimple - */ - function testSetName() { - - $this->usercalendars->setName('bla'); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - * @depends testSimple - */ - function testDelete() { - - $this->usercalendars->delete(); - - } - - /** - * @depends testSimple - */ - function testGetLastModified() { - - $this->assertNull($this->usercalendars->getLastModified()); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - * @depends testSimple - */ - function testCreateFile() { - - $this->usercalendars->createFile('bla'); - - } - - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - * @depends testSimple - */ - function testCreateDirectory() { - - $this->usercalendars->createDirectory('bla'); - - } - - /** - * @depends testSimple - */ - function testCreateExtendedCollection() { - - $result = $this->usercalendars->createExtendedCollection('newcalendar', array('{DAV:}collection', '{urn:ietf:params:xml:ns:caldav}calendar'), array()); - $this->assertNull($result); - $cals = $this->backend->getCalendarsForUser('principals/user1'); - $this->assertEquals(3,count($cals)); - - } - - /** - * @expectedException Sabre\DAV\Exception\InvalidResourceType - * @depends testSimple - */ - function testCreateExtendedCollectionBadResourceType() { - - $this->usercalendars->createExtendedCollection('newcalendar', array('{DAV:}collection','{DAV:}blabla'), array()); - - } - - /** - * @expectedException Sabre\DAV\Exception\InvalidResourceType - * @depends testSimple - */ - function testCreateExtendedCollectionNotACalendar() { - - $this->usercalendars->createExtendedCollection('newcalendar', array('{DAV:}collection'), array()); - - } - - function testGetSupportedPrivilegesSet() { - - $this->assertNull($this->usercalendars->getSupportedPrivilegeSet()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotImplemented - */ - function testShareReplyFail() { - - $this->usercalendars->shareReply('uri', SharingPlugin::STATUS_DECLINED, 'curi', '1'); - - } - -} -- cgit v1.2.3