aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2014-06-24 19:34:36 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2014-06-24 19:34:36 +0200
commitb8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70 (patch)
tree718df6305bcb82c8dcb4b287a7132422e748cdfb /vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php
parentc2d520f1be115fb3cb5da2a35eb10146cecee8aa (diff)
parenta92fb0b04c3e6474ec48faf8e4cc65c382e89d66 (diff)
downloadvolse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.gz
volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.bz2
volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php78
1 files changed, 78 insertions, 0 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php
new file mode 100644
index 000000000..9345bdcb2
--- /dev/null
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php
@@ -0,0 +1,78 @@
+<?php
+
+namespace Sabre\CalDAV;
+use Sabre\HTTP;
+
+/**
+ * This unittest is created to check if the time-range filter is working correctly with all-day-events
+ *
+ * @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ */
+class Issue228Test extends \Sabre\DAVServerTest {
+
+ protected $setupCalDAV = true;
+
+ protected $caldavCalendars = array(
+ array(
+ 'id' => 1,
+ 'name' => 'Calendar',
+ 'principaluri' => 'principals/user1',
+ 'uri' => 'calendar1',
+ )
+ );
+
+ protected $caldavCalendarObjects = array(
+ 1 => array(
+ 'event.ics' => array(
+ 'calendardata' => 'BEGIN:VCALENDAR
+VERSION:2.0
+BEGIN:VEVENT
+UID:20120730T113415CEST-6804EGphkd@xxxxxx.de
+DTSTAMP:20120730T093415Z
+DTSTART;VALUE=DATE:20120729
+DTEND;VALUE=DATE:20120730
+SUMMARY:sunday event
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+',
+ ),
+ ),
+ );
+
+ function testIssue228() {
+
+ $request = new HTTP\Request(array(
+ 'REQUEST_METHOD' => 'REPORT',
+ 'HTTP_CONTENT_TYPE' => 'application/xml',
+ 'REQUEST_URI' => '/calendars/user1/calendar1',
+ 'HTTP_DEPTH' => '1',
+ ));
+
+ $request->setBody('<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+ <D:prop>
+ <C:calendar-data>
+ <C:expand start="20120730T095609Z"
+ end="20120813T095609Z"/>
+</C:calendar-data>
+ <D:getetag/>
+ </D:prop>
+ <C:filter>
+ <C:comp-filter name="VCALENDAR">
+ <C:comp-filter name="VEVENT">
+ <C:time-range start="20120730T095609Z" end="20120813T095609Z"/>
+ </C:comp-filter>
+ </C:comp-filter>
+ </C:filter>
+</C:calendar-query>');
+
+ $response = $this->request($request);
+
+ // We must check if absolutely nothing was returned from this query.
+ $this->assertFalse(strpos($response->body, 'BEGIN:VCALENDAR'));
+
+ }
+}