diff options
author | Mario <mario@mariovavti.com> | 2021-03-08 09:31:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-08 09:31:23 +0000 |
commit | 951e9c8c4f39dd8577834d5bc501c05d80722de9 (patch) | |
tree | 6a42c6a229c7b2b3e13bc5af77a733d054242695 /vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php | |
parent | f94b046333c57acde493ee5dc2511acc6baca701 (diff) | |
parent | 89415e17313578eb115c441480b6e0ddfa90afef (diff) | |
download | volse-hubzilla-5.4.tar.gz volse-hubzilla-5.4.tar.bz2 volse-hubzilla-5.4.zip |
Merge branch '5.4RC'5.4
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php deleted file mode 100644 index 04dd29c04..000000000 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php +++ /dev/null @@ -1,120 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Sabre\DAVACL; - -use Sabre\DAV; - -class AllowAccessTest extends \PHPUnit\Framework\TestCase -{ - /** - * @var DAV\Server - */ - protected $server; - - public function setup(): void - { - $nodes = [ - new DAV\Mock\Collection('testdir', [ - 'file1.txt' => 'contents', - ]), - ]; - - $this->server = new DAV\Server($nodes); - $this->server->addPlugin( - new DAV\Auth\Plugin( - new DAV\Auth\Backend\Mock() - ) - ); - // Login - $this->server->getPlugin('auth')->beforeMethod( - new \Sabre\HTTP\Request('GET', '/'), - new \Sabre\HTTP\Response() - ); - $aclPlugin = new Plugin(); - $this->server->addPlugin($aclPlugin); - } - - public function testGet() - { - $this->server->httpRequest->setMethod('GET'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testGetDoesntExist() - { - $this->server->httpRequest->setMethod('GET'); - $this->server->httpRequest->setUrl('/foo'); - - $this->assertTrue($this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testHEAD() - { - $this->server->httpRequest->setMethod('HEAD'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod:HEAD', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testOPTIONS() - { - $this->server->httpRequest->setMethod('OPTIONS'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod:OPTIONS', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testPUT() - { - $this->server->httpRequest->setMethod('PUT'); - $this->server->httpRequest->setUrl('/testdir/file1.txt'); - - $this->assertTrue($this->server->emit('beforeMethod:PUT', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testPROPPATCH() - { - $this->server->httpRequest->setMethod('PROPPATCH'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod:PROPPATCH', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testCOPY() - { - $this->server->httpRequest->setMethod('COPY'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod:COPY', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testMOVE() - { - $this->server->httpRequest->setMethod('MOVE'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod:MOVE', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testLOCK() - { - $this->server->httpRequest->setMethod('LOCK'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod:LOCK', [$this->server->httpRequest, $this->server->httpResponse])); - } - - public function testBeforeBind() - { - $this->assertTrue($this->server->emit('beforeBind', ['testdir/file'])); - } - - public function testBeforeUnbind() - { - $this->assertTrue($this->server->emit('beforeUnbind', ['testdir'])); - } -} |