aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php52
1 files changed, 29 insertions, 23 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php
index 711cc0ac7..a4f08f7e5 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php
@@ -26,7 +26,7 @@ class PluginTest extends \PHPUnit\Framework\TestCase
*/
protected $caldavBackend;
- public function setup()
+ public function setup(): void
{
$caldavNS = '{urn:ietf:params:xml:ns:caldav}';
@@ -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));
@@ -349,7 +349,7 @@ END:VCALENDAR';
}
}
- $this->assertInternalType('array', $newCalendar);
+ $this->assertIsArray($newCalendar);
$keys = [
'uri' => 'NEWCALENDAR',
@@ -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));
@@ -394,7 +394,7 @@ END:VCALENDAR';
}
}
- $this->assertInternalType('array', $newCalendar);
+ $this->assertIsArray($newCalendar);
$keys = [
'uri' => 'NEWCALENDAR',
@@ -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());
}
/**