diff options
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php index 57732cd06..f11af8b95 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php @@ -6,16 +6,17 @@ namespace Sabre\CalDAV; use Sabre\DAV; use Sabre\DAV\Xml\Element\Sharee; +use Sabre\DAVServerTest; use Sabre\HTTP; -class SharingPluginTest extends \Sabre\DAVServerTest +class SharingPluginTest extends DAVServerTest { protected $setupCalDAV = true; protected $setupCalDAVSharing = true; protected $setupACL = true; protected $autoLogin = 'user1'; - public function setUp() + public function setup(): void { $this->caldavCalendars = [ [ @@ -51,11 +52,9 @@ class SharingPluginTest extends \Sabre\DAVServerTest ); } - /** - * @expectedException \LogicException - */ public function testSetupWithoutCoreSharingPlugin() { + $this->expectException('LogicException'); $server = new DAV\Server(); $server->addPlugin( new SharingPlugin() @@ -131,7 +130,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 +143,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 +156,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() @@ -180,7 +179,7 @@ RRR; $request->setBody($xml); - $response = $this->request($request, 200); + $this->request($request, 200); $this->assertEquals( [ @@ -230,7 +229,7 @@ RRR; $request->setBody($xml); - $response = $this->request($request, 403); + $this->request($request, 403); } public function testInviteReply() @@ -250,7 +249,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 +266,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,11 +284,11 @@ 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. - $this->assertEquals($xml, $request->getBody(true)); + $this->assertEquals($xml, $request->getBody()); } public function testPostWithoutContentType() @@ -312,7 +311,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 +329,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 +378,6 @@ RRR; $request->setBody($xml); $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); + $this->assertEquals(501, $response->status, $response->getBodyAsString()); } } |