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) --- .../dav/tests/Sabre/DAVACL/AllowAccessTest.php | 88 ++++++++++------------ 1 file changed, 38 insertions(+), 50 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php index f16693625..724abc685 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php @@ -1,18 +1,20 @@ 'contents', @@ -27,106 +29,92 @@ class AllowAccessTest extends \PHPUnit_Framework_TestCase { ); // Login $this->server->getPlugin('auth')->beforeMethod( - new \Sabre\HTTP\Request(), + new \Sabre\HTTP\Request('GET', '/'), new \Sabre\HTTP\Response() ); $aclPlugin = new Plugin(); $this->server->addPlugin($aclPlugin); - } - function testGet() { - + public function testGet() + { $this->server->httpRequest->setMethod('GET'); $this->server->httpRequest->setUrl('/testdir'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse])); } - function testGetDoesntExist() { - + public function testGetDoesntExist() + { $this->server->httpRequest->setMethod('GET'); $this->server->httpRequest->setUrl('/foo'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse])); } - function testHEAD() { - + public function testHEAD() + { $this->server->httpRequest->setMethod('HEAD'); $this->server->httpRequest->setUrl('/testdir'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:HEAD', [$this->server->httpRequest, $this->server->httpResponse])); } - function testOPTIONS() { - + public function testOPTIONS() + { $this->server->httpRequest->setMethod('OPTIONS'); $this->server->httpRequest->setUrl('/testdir'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:OPTIONS', [$this->server->httpRequest, $this->server->httpResponse])); } - function testPUT() { - + public function testPUT() + { $this->server->httpRequest->setMethod('PUT'); $this->server->httpRequest->setUrl('/testdir/file1.txt'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:PUT', [$this->server->httpRequest, $this->server->httpResponse])); } - function testPROPPATCH() { - + public function testPROPPATCH() + { $this->server->httpRequest->setMethod('PROPPATCH'); $this->server->httpRequest->setUrl('/testdir'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:PROPPATCH', [$this->server->httpRequest, $this->server->httpResponse])); } - function testCOPY() { - + public function testCOPY() + { $this->server->httpRequest->setMethod('COPY'); $this->server->httpRequest->setUrl('/testdir'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:COPY', [$this->server->httpRequest, $this->server->httpResponse])); } - function testMOVE() { - + public function testMOVE() + { $this->server->httpRequest->setMethod('MOVE'); $this->server->httpRequest->setUrl('/testdir'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:MOVE', [$this->server->httpRequest, $this->server->httpResponse])); } - function testLOCK() { - + public function testLOCK() + { $this->server->httpRequest->setMethod('LOCK'); $this->server->httpRequest->setUrl('/testdir'); - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - + $this->assertTrue($this->server->emit('beforeMethod:LOCK', [$this->server->httpRequest, $this->server->httpResponse])); } - function testBeforeBind() { - + public function testBeforeBind() + { $this->assertTrue($this->server->emit('beforeBind', ['testdir/file'])); - } - - function testBeforeUnbind() { - + public function testBeforeUnbind() + { $this->assertTrue($this->server->emit('beforeUnbind', ['testdir'])); - } - } -- cgit v1.2.3