From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- .../sabre/dav/tests/Sabre/DAV/ServerPluginTest.php | 73 ++++++++++------------ 1 file changed, 32 insertions(+), 41 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php index fa67102cc..35de59e37 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php @@ -1,5 +1,7 @@ server->addPlugin($testPlugin); $this->testPlugin = $testPlugin; - } - /** - */ - function testBaseClass() { - + public function testBaseClass() + { $p = new ServerPluginMock(); $this->assertEquals([], $p->getFeatures()); $this->assertEquals([], $p->getHTTPMethods('')); $this->assertEquals( [ - 'name' => 'Sabre\DAV\ServerPluginMock', + 'name' => 'Sabre\DAV\ServerPluginMock', 'description' => null, - 'link' => null + 'link' => null, ], $p->getPluginInfo() ); - } - function testOptions() { - + public function testOptions() + { $serverVars = [ - 'REQUEST_URI' => '/', + 'REQUEST_URI' => '/', 'REQUEST_METHOD' => 'OPTIONS', ]; @@ -53,56 +51,49 @@ class ServerPluginTest extends AbstractServer { $this->server->exec(); $this->assertEquals([ - 'DAV' => ['1, 3, extended-mkcol, drinking'], - 'MS-Author-Via' => ['DAV'], - 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE'], - 'Accept-Ranges' => ['bytes'], - 'Content-Length' => ['0'], + 'DAV' => ['1, 3, extended-mkcol, drinking'], + 'MS-Author-Via' => ['DAV'], + 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE'], + 'Accept-Ranges' => ['bytes'], + 'Content-Length' => ['0'], 'X-Sabre-Version' => [Version::VERSION], ], $this->response->getHeaders()); $this->assertEquals(200, $this->response->status); $this->assertEquals('', $this->response->body); $this->assertEquals('OPTIONS', $this->testPlugin->beforeMethod); - - } - function testGetPlugin() { - + public function testGetPlugin() + { $this->assertEquals($this->testPlugin, $this->server->getPlugin(get_class($this->testPlugin))); - } - function testUnknownPlugin() { - + public function testUnknownPlugin() + { $this->assertNull($this->server->getPlugin('SomeRandomClassName')); - } - function testGetSupportedReportSet() { - + public function testGetSupportedReportSet() + { $this->assertEquals([], $this->testPlugin->getSupportedReportSet('/')); - } - function testGetPlugins() { - + public function testGetPlugins() + { $this->assertEquals( [ get_class($this->testPlugin) => $this->testPlugin, - 'core' => $this->server->getPlugin('core'), + 'core' => $this->server->getPlugin('core'), ], $this->server->getPlugins() ); - } - - } -class ServerPluginMock extends ServerPlugin { - - function initialize(Server $s) { } - +class ServerPluginMock extends ServerPlugin +{ + public function initialize(Server $s) + { + } } -- cgit v1.2.3