diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-30 21:51:33 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-30 21:51:33 -0400 |
commit | 0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61 (patch) | |
tree | b6684b05aee92729406a90f397ccd446f58863c7 /vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php | |
parent | 7124c0aee5486aab74272c81ceb3e383b2e3a7f7 (diff) | |
parent | 852b2659e9a71f0542e822aa20efc009e22ff66a (diff) | |
download | volse-hubzilla-0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61.tar.gz volse-hubzilla-0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61.tar.bz2 volse-hubzilla-0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php index 84f05f3c0..7a756774f 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php @@ -3,7 +3,6 @@ namespace Sabre\CalDAV; use Sabre\DAV; -use Sabre\DAVACL; use Sabre\HTTP; require_once 'Sabre/CalDAV/Backend/Mock.php'; @@ -31,8 +30,8 @@ END:VEVENT END:VCALENDAR ics; - $obj2 = fopen('php://memory','r+'); - fwrite($obj2,<<<ics + $obj2 = fopen('php://memory', 'r+'); + fwrite($obj2, <<<ics BEGIN:VCALENDAR BEGIN:VEVENT DTSTART:20121005T120000Z @@ -55,18 +54,18 @@ ics; $calendarData = [ 1 => [ 'obj1' => [ - 'calendarid' => 1, - 'uri' => 'event1.ics', + 'calendarid' => 1, + 'uri' => 'event1.ics', 'calendardata' => $obj1, ], 'obj2' => [ - 'calendarid' => 1, - 'uri' => 'event2.ics', + 'calendarid' => 1, + 'uri' => 'event2.ics', 'calendardata' => $obj2 ], 'obj3' => [ - 'calendarid' => 1, - 'uri' => 'event3.ics', + 'calendarid' => 1, + 'uri' => 'event3.ics', 'calendardata' => $obj3 ] ], @@ -76,9 +75,9 @@ ics; $caldavBackend = new Backend\Mock([], $calendarData); $calendar = new Calendar($caldavBackend, [ - 'id' => 1, - 'uri' => 'calendar', - 'principaluri' => 'principals/user1', + 'id' => 1, + 'uri' => 'calendar', + 'principaluri' => 'principals/user1', '{' . Plugin::NS_CALDAV . '}calendar-timezone' => "BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nEND:VTIMEZONE\r\nEND:VCALENDAR", ]); @@ -105,13 +104,13 @@ ics; XML; $report = $this->server->xml->parse($reportXML, null, $rootElem); - $this->plugin->report($rootElem, $report); + $this->plugin->report($rootElem, $report, null); $this->assertEquals(200, $this->server->httpResponse->status); $this->assertEquals('text/calendar', $this->server->httpResponse->getHeader('Content-Type')); - $this->assertTrue(strpos($this->server->httpResponse->body, 'BEGIN:VFREEBUSY')!==false); - $this->assertTrue(strpos($this->server->httpResponse->body, '20111005T120000Z/20111005T130000Z')!==false); - $this->assertTrue(strpos($this->server->httpResponse->body, '20111006T100000Z/20111006T110000Z')!==false); + $this->assertTrue(strpos($this->server->httpResponse->body, 'BEGIN:VFREEBUSY') !== false); + $this->assertTrue(strpos($this->server->httpResponse->body, '20111005T120000Z/20111005T130000Z') !== false); + $this->assertTrue(strpos($this->server->httpResponse->body, '20111006T100000Z/20111006T110000Z') !== false); } @@ -127,7 +126,6 @@ XML; XML; $report = $this->server->xml->parse($reportXML, null, $rootElem); - $this->plugin->report($rootElem, $report); } @@ -136,9 +134,9 @@ XML; */ function testFreeBusyReportWrongNode() { - $request = HTTP\Sapi::createFromServerArray(array( + $request = HTTP\Sapi::createFromServerArray([ 'REQUEST_URI' => '/', - )); + ]); $this->server->httpRequest = $request; $reportXML = <<<XML @@ -149,7 +147,7 @@ XML; XML; $report = $this->server->xml->parse($reportXML, null, $rootElem); - $this->plugin->report($rootElem, $report); + $this->plugin->report($rootElem, $report, null); } @@ -170,7 +168,7 @@ XML; XML; $report = $this->server->xml->parse($reportXML, null, $rootElem); - $this->plugin->report($rootElem, $report); + $this->plugin->report($rootElem, $report, null); } } |