From f132436af3c90cff8dcef852bd836546311036f3 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 7 May 2020 21:48:26 +0000 Subject: composer updates 2 --- .../dav/tests/Sabre/DAVACL/BlockAccessTest.php | 46 ++++++---------------- 1 file changed, 12 insertions(+), 34 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php index 3c3aaf6c9..566167ef0 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php @@ -14,7 +14,7 @@ class BlockAccessTest extends \PHPUnit\Framework\TestCase protected $server; protected $plugin; - public function setUp() + public function setup(): void { $nodes = [ new DAV\SimpleCollection('testdir'), @@ -36,11 +36,9 @@ class BlockAccessTest extends \PHPUnit\Framework\TestCase $this->server->addPlugin($this->plugin); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testGet() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('GET'); $this->server->httpRequest->setUrl('/testdir'); @@ -56,107 +54,87 @@ class BlockAccessTest extends \PHPUnit\Framework\TestCase $this->assertTrue($r); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testHEAD() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('HEAD'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testOPTIONS() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('OPTIONS'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testPUT() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('PUT'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testPROPPATCH() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('PROPPATCH'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testCOPY() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('COPY'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testMOVE() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('MOVE'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testACL() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('ACL'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testLOCK() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->httpRequest->setMethod('LOCK'); $this->server->httpRequest->setUrl('/testdir'); $this->server->emit('beforeMethod:GET', [$this->server->httpRequest, $this->server->httpResponse]); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testBeforeBind() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->emit('beforeBind', ['testdir/file']); } - /** - * @expectedException \Sabre\DAVACL\Exception\NeedPrivileges - */ public function testBeforeUnbind() { + $this->expectException('Sabre\DAVACL\Exception\NeedPrivileges'); $this->server->emit('beforeUnbind', ['testdir']); } -- cgit v1.2.3