diff options
author | Mario <mario@mariovavti.com> | 2019-11-10 12:49:51 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-10 14:10:03 +0100 |
commit | 580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch) | |
tree | 82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php | |
parent | d22766f458a8539a40a57f3946459a9be1f21cd6 (diff) | |
download | volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2 volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip |
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php | 73 |
1 files changed, 32 insertions, 41 deletions
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 @@ <?php +declare(strict_types=1); + namespace Sabre\DAV; use Sabre\HTTP; @@ -7,44 +9,40 @@ use Sabre\HTTP; require_once 'Sabre/DAV/AbstractServer.php'; require_once 'Sabre/DAV/TestPlugin.php'; -class ServerPluginTest extends AbstractServer { - +class ServerPluginTest extends AbstractServer +{ /** * @var Sabre\DAV\TestPlugin */ protected $testPlugin; - function setUp() { - + public function setUp() + { parent::setUp(); $testPlugin = new TestPlugin(); $this->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) + { + } } |