diff options
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV')
14 files changed, 105 insertions, 68 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php index 80de750dc..d2df483cd 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php @@ -1026,6 +1026,15 @@ abstract class AbstractPDOTest extends \PHPUnit\Framework\TestCase $calData ); + $calDataResource = "BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n"; + $stream = fopen('data://text/plain,'.$calData, 'r'); + + $backend->createSchedulingObject( + 'principals/user1', + 'schedule1-resource.ics', + $stream + ); + $expected = [ 'calendardata' => $calData, 'uri' => 'schedule1.ics', @@ -1033,6 +1042,13 @@ abstract class AbstractPDOTest extends \PHPUnit\Framework\TestCase 'size' => strlen($calData), ]; + $expectedResource = [ + 'calendardata' => $calDataResource, + 'uri' => 'schedule1-resource.ics', + 'etag' => '"'.md5($calDataResource).'"', + 'size' => strlen($calDataResource), + ]; + $result = $backend->getSchedulingObject('principals/user1', 'schedule1.ics'); foreach ($expected as $k => $v) { $this->assertArrayHasKey($k, $result); @@ -1042,6 +1058,17 @@ abstract class AbstractPDOTest extends \PHPUnit\Framework\TestCase $this->assertEquals($v, $result[$k]); } + $resultResource = $backend->getSchedulingObject('principals/user1', 'schedule1-resource.ics'); + foreach ($expected as $k => $v) { + $this->assertArrayHasKey($k, $result); + if (is_resource($result[$k])) { + $result[$k] = stream_get_contents($result[$k]); + } + $this->assertEquals($v, $result[$k]); + } + + $backend->deleteSchedulingObject('principals/user1', 'schedule1-resource.ics'); + $results = $backend->getSchedulingObjects('principals/user1'); $this->assertEquals(1, count($results)); diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDTest.php index 49252744d..d6e7b491c 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDTest.php @@ -82,11 +82,12 @@ END:VCALENDAR $response = $this->request($request); + $bodyAsString = $response->getBodyAsString(); // Everts super awesome xml parser. $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 + $bodyAsString, + $start = strpos($bodyAsString, 'BEGIN:VCALENDAR'), + strpos($bodyAsString, 'END:VCALENDAR') - $start + 13 ); $body = str_replace(' ', '', $body); diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php index 3a982fcfa..50fb6c03c 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php @@ -73,11 +73,12 @@ END:VCALENDAR $response = $this->request($request); + $bodyAsString = $response->getBodyAsString(); // Everts super awesome xml parser. $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 + $bodyAsString, + $start = strpos($bodyAsString, 'BEGIN:VCALENDAR'), + strpos($bodyAsString, 'END:VCALENDAR') - $start + 13 ); $body = str_replace(' ', '', $body); diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php index 90897f1c5..5e5c153e0 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php @@ -84,11 +84,12 @@ END:VCALENDAR $response = $this->request($request); + $bodyAsString = $response->getBodyAsString(); // Everts super awesome xml parser. $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 + $bodyAsString, + $start = strpos($bodyAsString, 'BEGIN:VCALENDAR'), + strpos($bodyAsString, 'END:VCALENDAR') - $start + 13 ); $body = str_replace(' ', '', $body); diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/GetEventsByTimerangeTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/GetEventsByTimerangeTest.php index 6cb2b609e..e82a85dd8 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/GetEventsByTimerangeTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/GetEventsByTimerangeTest.php @@ -77,6 +77,6 @@ END:VCALENDAR $response = $this->request($request); - $this->assertTrue(false !== strpos($response->body, 'BEGIN:VCALENDAR')); + $this->assertTrue(false !== strpos($response->getBodyAsString(), 'BEGIN:VCALENDAR')); } } diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php index c139e5b5c..8c99e6c46 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php @@ -82,7 +82,7 @@ ICS $this->assertEquals(200, $response->getStatus()); $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - $obj = VObject\Reader::read($response->body); + $obj = VObject\Reader::read($response->getBodyAsString()); $this->assertEquals(8, count($obj->children())); $this->assertEquals(1, count($obj->VERSION)); @@ -108,7 +108,7 @@ ICS $this->assertEquals(200, $response->getStatus()); $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - $obj = VObject\Reader::read($response->body); + $obj = VObject\Reader::read($response->getBodyAsString()); $this->assertEquals(8, count($obj->children())); $this->assertEquals(1, count($obj->VERSION)); @@ -166,7 +166,7 @@ ICS $response = $this->request($request, 200); $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - $obj = VObject\Reader::read($response->body); + $obj = VObject\Reader::read($response->getBodyAsString()); $this->assertEquals(8, count($obj->children())); $this->assertEquals(1, count($obj->VERSION)); @@ -276,7 +276,7 @@ ICS $response = $this->request($request, 200); - $obj = VObject\Reader::read($response->body); + $obj = VObject\Reader::read($response->getBodyAsString()); $this->assertEquals(1, count($obj->VTIMEZONE)); $this->assertEquals(1, count($obj->VEVENT)); $this->assertNull($obj->VTODO); @@ -291,7 +291,7 @@ ICS $response = $this->request($request, 200); - $obj = VObject\Reader::read($response->body); + $obj = VObject\Reader::read($response->getBodyAsString()); $this->assertNull($obj->VTIMEZONE); $this->assertNull($obj->VEVENT); diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue203Test.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue203Test.php index 0700024cf..9a786c505 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue203Test.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue203Test.php @@ -86,11 +86,12 @@ END:VCALENDAR $response = $this->request($request); + $bodyAsString = $response->getBodyAsString(); // Everts super awesome xml parser. $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 + $bodyAsString, + $start = strpos($bodyAsString, 'BEGIN:VCALENDAR'), + strpos($bodyAsString, 'END:VCALENDAR') - $start + 13 ); $body = str_replace(' ', '', $body); diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue205Test.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue205Test.php index 60c944d1d..b021634ba 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue205Test.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue205Test.php @@ -81,14 +81,14 @@ END:VCALENDAR $response = $this->request($request); - $this->assertFalse(strpos($response->body, '<s:exception>Exception</s:exception>'), 'Exception occurred: '.$response->body); - $this->assertFalse(strpos($response->body, 'Unknown or bad format'), 'DateTime unknown format Exception: '.$response->body); + $this->assertFalse(strpos($response->getBodyAsString(), '<s:exception>Exception</s:exception>'), 'Exception occurred: '.$response->getBodyAsString()); + $this->assertFalse(strpos($response->getBodyAsString(), 'Unknown or bad format'), 'DateTime unknown format Exception: '.$response->getBodyAsString()); // Everts super awesome xml parser. $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 + $response->getBodyAsString(), + $start = strpos($response->getBodyAsString(), 'BEGIN:VCALENDAR'), + strpos($response->getBodyAsString(), 'END:VCALENDAR') - $start + 13 ); $body = str_replace(' ', '', $body); diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue211Test.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue211Test.php index 10c9af50c..d7fa18c09 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue211Test.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue211Test.php @@ -85,6 +85,6 @@ END:VCALENDAR // if this assert is reached, the endless loop is gone // There should be no matching events - $this->assertFalse(strpos('BEGIN:VEVENT', $response->body)); + $this->assertFalse(strpos('BEGIN:VEVENT', $response->getBodyAsString())); } } diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue220Test.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue220Test.php index 46f5ca205..8e51e49e2 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue220Test.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue220Test.php @@ -93,8 +93,8 @@ END:VCALENDAR $response = $this->request($request); - $this->assertFalse(strpos($response->body, '<s:exception>PHPUnit_Framework_Error_Warning</s:exception>'), 'Error Warning occurred: '.$response->body); - $this->assertFalse(strpos($response->body, 'Invalid argument supplied for foreach()'), 'Invalid argument supplied for foreach(): '.$response->body); + $this->assertFalse(strpos($response->getBodyAsString(), '<s:exception>PHPUnit_Framework_Error_Warning</s:exception>'), 'Error Warning occurred: '.$response->getBodyAsString()); + $this->assertFalse(strpos($response->getBodyAsString(), 'Invalid argument supplied for foreach()'), 'Invalid argument supplied for foreach(): '.$response->getBodyAsString()); $this->assertEquals(207, $response->status); } diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php index a8b855ca3..1f698e7dd 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php @@ -75,6 +75,6 @@ END:VCALENDAR $response = $this->request($request); // We must check if absolutely nothing was returned from this query. - $this->assertFalse(strpos($response->body, 'BEGIN:VCALENDAR')); + $this->assertFalse(strpos($response->getBodyAsString(), 'BEGIN:VCALENDAR')); } } diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php index 711cc0ac7..f065e1ac8 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php @@ -118,7 +118,7 @@ class PluginTest extends \PHPUnit\Framework\TestCase $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(501, $this->response->status, 'Incorrect status returned. Full response body:'.$this->response->body); + $this->assertEquals(501, $this->response->status, 'Incorrect status returned. Full response body:'.$this->response->getBodyAsString()); } public function testGetWithoutContentType() @@ -336,7 +336,7 @@ END:VCALENDAR'; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(201, $this->response->status, 'Invalid response code received. Full response body: '.$this->response->body); + $this->assertEquals(201, $this->response->status, 'Invalid response code received. Full response body: '.$this->response->getBodyAsString()); $calendars = $this->caldavBackend->getCalendarsForUser('principals/user1'); $this->assertEquals(3, count($calendars)); @@ -381,7 +381,7 @@ END:VCALENDAR'; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(201, $this->response->status, 'Invalid response code received. Full response body: '.$this->response->body); + $this->assertEquals(201, $this->response->status, 'Invalid response code received. Full response body: '.$this->response->getBodyAsString()); $calendars = $this->caldavBackend->getCalendarsForUser('principals/user1'); $this->assertEquals(3, count($calendars)); @@ -606,7 +606,8 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(207, $this->response->status, 'Invalid HTTP status received. Full response body: '.$this->response->body); + $bodyAsString = $this->response->getBodyAsString(); + $this->assertEquals(207, $this->response->status, 'Invalid HTTP status received. Full response body: '.$bodyAsString); $expectedIcal = TestUtil::getTestCalendarData(); $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); @@ -632,7 +633,7 @@ XML; </d:multistatus> XML; - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); + $this->assertXmlStringEqualsXmlString($expected, $bodyAsString); } /** @@ -663,7 +664,8 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->body); + $bodyAsString = $this->response->getBodyAsString(); + $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$bodyAsString); $expectedIcal = TestUtil::getTestCalendarData(); $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); @@ -689,7 +691,7 @@ XML; </d:multistatus> XML; - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); + $this->assertXmlStringEqualsXmlString($expected, $bodyAsString); } /** @@ -724,7 +726,8 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->body); + $bodyAsString = $this->response->getBodyAsString(); + $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$bodyAsString); $expectedIcal = TestUtil::getTestCalendarData(); $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); @@ -750,7 +753,7 @@ XML; </d:multistatus> XML; - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); + $this->assertXmlStringEqualsXmlString($expected, $bodyAsString); } /** @@ -783,7 +786,7 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(400, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->body); + $this->assertEquals(400, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->getBodyAsString()); } /** @@ -812,7 +815,8 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->body); + $bodyAsString = $this->server->httpResponse->getBodyAsString(); + $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$bodyAsString); $expected = <<<XML <?xml version="1.0"?> @@ -829,7 +833,7 @@ XML; </d:multistatus> XML; - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); + $this->assertXmlStringEqualsXmlString($expected, $bodyAsString); } /** @@ -852,7 +856,7 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(400, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->body); + $this->assertEquals(400, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->getBodyAsString()); } /** @@ -883,7 +887,8 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->body); + $bodyAsString = $this->server->httpResponse->getBodyAsString(); + $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$bodyAsString); $expectedIcal = TestUtil::getTestCalendarData(); $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); @@ -909,7 +914,7 @@ XML; </d:multistatus> XML; - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); + $this->assertXmlStringEqualsXmlString($expected, $bodyAsString); } /** @@ -937,7 +942,8 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$this->response->body); + $bodyAsString = $this->server->httpResponse->getBodyAsString(); + $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: '.$bodyAsString); $expected = <<<XML <?xml version="1.0"?> @@ -954,7 +960,7 @@ XML; </d:multistatus> XML; - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); + $this->assertXmlStringEqualsXmlString($expected, $bodyAsString); } public function testHTMLActionsPanel() @@ -989,7 +995,7 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: '.$this->response->body); + $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: '.$this->response->getBodyAsString()); } /** @@ -1015,7 +1021,7 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: '.$this->response->body); + $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: '.$this->response->getBodyAsString()); } /** @@ -1041,7 +1047,7 @@ XML; $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: '.$this->response->body); + $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: '.$this->response->getBodyAsString()); } /** diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php index 57732cd06..45c389cc2 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php @@ -131,7 +131,7 @@ class SharingPluginTest extends \Sabre\DAVServerTest $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); + $this->assertEquals(501, $response->status, $response->getBodyAsString()); } public function testUnknownMethodNoXML() @@ -144,7 +144,7 @@ class SharingPluginTest extends \Sabre\DAVServerTest $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); + $this->assertEquals(501, $response->status, $response->getBodyAsString()); } public function testUnknownMethodNoNode() @@ -157,7 +157,7 @@ class SharingPluginTest extends \Sabre\DAVServerTest $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); + $this->assertEquals(501, $response->status, $response->getBodyAsString()); } public function testShareRequest() @@ -250,7 +250,7 @@ RRR; $request->setBody($xml); $response = $this->request($request); - $this->assertEquals(200, $response->status, $response->body); + $this->assertEquals(200, $response->status, $response->getBodyAsString()); } public function testInviteBadXML() @@ -267,7 +267,7 @@ RRR; '; $request->setBody($xml); $response = $this->request($request); - $this->assertEquals(400, $response->status, $response->body); + $this->assertEquals(400, $response->status, $response->getBodyAsString()); } public function testInviteWrongUrl() @@ -285,7 +285,7 @@ RRR; '; $request->setBody($xml); $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); + $this->assertEquals(501, $response->status, $response->getBodyAsString()); // If the plugin did not handle this request, it must ensure that the // body is still accessible by other plugins. @@ -312,7 +312,7 @@ RRR; $request->setBody($xml); $response = $this->request($request); - $this->assertEquals(202, $response->status, $response->body); + $this->assertEquals(202, $response->status, $response->getBodyAsString()); } public function testUnpublish() @@ -330,7 +330,7 @@ RRR; $request->setBody($xml); $response = $this->request($request); - $this->assertEquals(200, $response->status, $response->body); + $this->assertEquals(200, $response->status, $response->getBodyAsString()); } public function testPublishWrongUrl() @@ -379,6 +379,6 @@ RRR; $request->setBody($xml); $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); + $this->assertEquals(501, $response->status, $response->getBodyAsString()); } } diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/ValidateICalTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/ValidateICalTest.php index e6d1edace..fc87184d9 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/ValidateICalTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/ValidateICalTest.php @@ -100,7 +100,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); $this->assertEquals([ 'X-Sabre-Version' => [DAV\Version::VERSION], 'Content-Length' => ['0'], @@ -140,7 +140,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testCreateFileNoVersionFixed() @@ -166,7 +166,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); $this->assertEquals([ 'X-Sabre-Version' => [DAV\Version::VERSION], 'Content-Length' => ['0'], @@ -213,7 +213,7 @@ ICS; $request->setBody($ics); $response = $this->request($request); - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testCreateFileNoUID() @@ -226,7 +226,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testCreateFileVCard() @@ -239,7 +239,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testCreateFile2Components() @@ -252,7 +252,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testCreateFile2UIDS() @@ -265,7 +265,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testCreateFileWrongComponent() @@ -278,7 +278,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testUpdateFile() @@ -338,7 +338,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } public function testUpdateFileInvalidComponent() @@ -352,7 +352,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); } /** @@ -385,7 +385,7 @@ ICS; $response = $this->request($request); - $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->body); + $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString()); $this->assertNull($response->getHeader('ETag')); } } |