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) --- .../CalDAV/Property/AllowedSharingModesTest.php | 46 ----- .../dav/tests/Sabre/CalDAV/Property/InviteTest.php | 196 --------------------- .../CalDAV/Property/ScheduleCalendarTranspTest.php | 99 ----------- .../Property/SupportedCalendarComponentSetTest.php | 67 ------- .../CalDAV/Property/SupportedCalendarDataTest.php | 44 ----- .../CalDAV/Property/SupportedCollationSetTest.php | 46 ----- 6 files changed, 498 deletions(-) delete mode 100644 vendor/sabre/dav/tests/Sabre/CalDAV/Property/AllowedSharingModesTest.php delete mode 100644 vendor/sabre/dav/tests/Sabre/CalDAV/Property/InviteTest.php delete mode 100644 vendor/sabre/dav/tests/Sabre/CalDAV/Property/ScheduleCalendarTranspTest.php delete mode 100644 vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarComponentSetTest.php delete mode 100644 vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarDataTest.php delete mode 100644 vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCollationSetTest.php (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/Property') diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/AllowedSharingModesTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Property/AllowedSharingModesTest.php deleted file mode 100644 index 733ea1108..000000000 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/AllowedSharingModesTest.php +++ /dev/null @@ -1,46 +0,0 @@ -createElement('d:root'); - $root->setAttribute('xmlns:d','DAV:'); - $root->setAttribute('xmlns:cal',CalDAV\Plugin::NS_CALDAV); - $root->setAttribute('xmlns:cs',CalDAV\Plugin::NS_CALENDARSERVER); - - $doc->appendChild($root); - $server = new DAV\Server(); - - $property->serialize($server, $root); - - $xml = $doc->saveXML(); - - $this->assertEquals( -' -' . -'' . -'' . -' -', $xml); - - } - -} diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/InviteTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Property/InviteTest.php deleted file mode 100644 index 349a6e080..000000000 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/InviteTest.php +++ /dev/null @@ -1,196 +0,0 @@ - 'mailto:user1@example.org', - 'status' => CalDAV\SharingPlugin::STATUS_ACCEPTED, - 'readOnly' => false, - ), - array( - 'href' => 'mailto:user2@example.org', - 'commonName' => 'John Doe', - 'status' => CalDAV\SharingPlugin::STATUS_DECLINED, - 'readOnly' => true, - ), - array( - 'href' => 'mailto:user3@example.org', - 'commonName' => 'Joe Shmoe', - 'status' => CalDAV\SharingPlugin::STATUS_NORESPONSE, - 'readOnly' => true, - 'summary' => 'Something, something', - ), - array( - 'href' => 'mailto:user4@example.org', - 'commonName' => 'Hoe Boe', - 'status' => CalDAV\SharingPlugin::STATUS_INVALID, - 'readOnly' => true, - ), - ), array( - 'href' => 'mailto:thedoctor@example.org', - 'commonName' => 'The Doctor', - 'firstName' => 'The', - 'lastName' => 'Doctor', - )); - - $doc = new \DOMDocument(); - $doc->formatOutput = true; - $root = $doc->createElement('d:root'); - $root->setAttribute('xmlns:d','DAV:'); - $root->setAttribute('xmlns:cal',CalDAV\Plugin::NS_CALDAV); - $root->setAttribute('xmlns:cs',CalDAV\Plugin::NS_CALENDARSERVER); - - $doc->appendChild($root); - $server = new DAV\Server(); - - $property->serialize($server, $root); - - $xml = $doc->saveXML(); - - $this->assertEquals( -' - - - mailto:thedoctor@example.org - The Doctor - The - Doctor - - - mailto:user1@example.org - - - - - - - mailto:user2@example.org - John Doe - - - - - - - mailto:user3@example.org - Joe Shmoe - - - - - Something, something - - - mailto:user4@example.org - Hoe Boe - - - - - - -', $xml); - - } - - /** - * @depends testSerialize - */ - public function testUnserialize() { - - $input = array( - array( - 'href' => 'mailto:user1@example.org', - 'status' => CalDAV\SharingPlugin::STATUS_ACCEPTED, - 'readOnly' => false, - 'commonName' => '', - 'summary' => '', - ), - array( - 'href' => 'mailto:user2@example.org', - 'commonName' => 'John Doe', - 'status' => CalDAV\SharingPlugin::STATUS_DECLINED, - 'readOnly' => true, - 'summary' => '', - ), - array( - 'href' => 'mailto:user3@example.org', - 'commonName' => 'Joe Shmoe', - 'status' => CalDAV\SharingPlugin::STATUS_NORESPONSE, - 'readOnly' => true, - 'summary' => 'Something, something', - ), - array( - 'href' => 'mailto:user4@example.org', - 'commonName' => 'Hoe Boe', - 'status' => CalDAV\SharingPlugin::STATUS_INVALID, - 'readOnly' => true, - 'summary' => '', - ), - ); - - // Creating the xml - $doc = new \DOMDocument(); - $doc->formatOutput = true; - $root = $doc->createElement('d:root'); - $root->setAttribute('xmlns:d','DAV:'); - $root->setAttribute('xmlns:cal',CalDAV\Plugin::NS_CALDAV); - $root->setAttribute('xmlns:cs',CalDAV\Plugin::NS_CALENDARSERVER); - - $doc->appendChild($root); - $server = new DAV\Server(); - - $inputProperty = new Invite($input); - $inputProperty->serialize($server, $root); - - $xml = $doc->saveXML(); - - // Parsing it again - - $doc2 = DAV\XMLUtil::loadDOMDocument($xml); - - $outputProperty = Invite::unserialize($doc2->firstChild); - - $this->assertEquals($input, $outputProperty->getValue()); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testUnserializeNoStatus() { - -$xml = ' - - - mailto:user1@example.org - - - - - -'; - - $doc2 = DAV\XMLUtil::loadDOMDocument($xml); - $outputProperty = Invite::unserialize($doc2->firstChild); - - } - -} diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/ScheduleCalendarTranspTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Property/ScheduleCalendarTranspTest.php deleted file mode 100644 index 1ace0b18f..000000000 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/ScheduleCalendarTranspTest.php +++ /dev/null @@ -1,99 +0,0 @@ -assertEquals('transparent', $sccs->getValue()); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testBadArg() { - - $sccs = new ScheduleCalendarTransp('foo'); - - } - - function values() { - - return array( - array('transparent'), - array('opaque'), - ); - - } - - /** - * @depends testSimple - * @dataProvider values - */ - function testSerialize($value) { - - $property = new ScheduleCalendarTransp($value); - - $doc = new \DOMDocument(); - $root = $doc->createElement('d:root'); - $root->setAttribute('xmlns:d','DAV:'); - $root->setAttribute('xmlns:cal',CalDAV\Plugin::NS_CALDAV); - - $doc->appendChild($root); - $server = new DAV\Server(); - - $property->serialize($server, $root); - - $xml = $doc->saveXML(); - - $this->assertEquals( -' -' . -'' . -' -', $xml); - - } - - /** - * @depends testSimple - * @dataProvider values - */ - function testUnserializer($value) { - - $xml = ' -' . -'' . -''; - - $dom = DAV\XMLUtil::loadDOMDocument($xml); - - $property = ScheduleCalendarTransp::unserialize($dom->firstChild); - - $this->assertTrue($property instanceof ScheduleCalendarTransp); - $this->assertEquals($value, $property->getValue()); - - } - - /** - * @depends testSimple - */ - function testUnserializerBadData() { - - $xml = ' -' . -'' . -''; - - $dom = DAV\XMLUtil::loadDOMDocument($xml); - - $this->assertNull(ScheduleCalendarTransp::unserialize($dom->firstChild)); - - } -} diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarComponentSetTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarComponentSetTest.php deleted file mode 100644 index 3e5d5f5fc..000000000 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarComponentSetTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertEquals(array('VEVENT'), $sccs->getValue()); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $property = new SupportedCalendarComponentSet(array('VEVENT','VJOURNAL')); - - $doc = new \DOMDocument(); - $root = $doc->createElement('d:root'); - $root->setAttribute('xmlns:d','DAV:'); - $root->setAttribute('xmlns:cal',\Sabre\CalDAV\Plugin::NS_CALDAV); - - $doc->appendChild($root); - $server = new \Sabre\DAV\Server(); - - $property->serialize($server, $root); - - $xml = $doc->saveXML(); - - $this->assertEquals( -' -' . -'' . -'' . -' -', $xml); - - } - - /** - * @depends testSimple - */ - function testUnserializer() { - - $xml = ' -' . -'' . -'' . -''; - - $dom = \Sabre\DAV\XMLUtil::loadDOMDocument($xml); - - $property = SupportedCalendarComponentSet::unserialize($dom->firstChild); - - $this->assertTrue($property instanceof SupportedCalendarComponentSet); - $this->assertEquals(array( - 'VEVENT', - 'VJOURNAL', - ), - $property->getValue()); - - } - -} diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarDataTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarDataTest.php deleted file mode 100644 index 3e016368c..000000000 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCalendarDataTest.php +++ /dev/null @@ -1,44 +0,0 @@ -createElement('d:root'); - $root->setAttribute('xmlns:d','DAV:'); - $root->setAttribute('xmlns:cal',CalDAV\Plugin::NS_CALDAV); - - $doc->appendChild($root); - $server = new DAV\Server(); - - $property->serialize($server, $root); - - $xml = $doc->saveXML(); - - $this->assertEquals( -' -' . -'' . -' -', $xml); - - } - -} diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCollationSetTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCollationSetTest.php deleted file mode 100644 index 669e31553..000000000 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Property/SupportedCollationSetTest.php +++ /dev/null @@ -1,46 +0,0 @@ -createElement('d:root'); - $root->setAttribute('xmlns:d','DAV:'); - $root->setAttribute('xmlns:cal',CalDAV\Plugin::NS_CALDAV); - - $doc->appendChild($root); - $server = new DAV\Server(); - - $property->serialize($server, $root); - - $xml = $doc->saveXML(); - - $this->assertEquals( -' -' . -'i;ascii-casemap' . -'i;octet' . -'i;unicode-casemap' . -' -', $xml); - - } - -} -- cgit v1.2.3