diff options
author | Mario <mario@mariovavti.com> | 2020-05-07 21:48:26 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-05-07 21:48:26 +0000 |
commit | f132436af3c90cff8dcef852bd836546311036f3 (patch) | |
tree | 89531366ba5fc62095981a81a91a2fc52adcad9c /vendor/sabre/dav/tests/Sabre/DAVACL | |
parent | fae70bf0a7f1b566d25e30064f60d58ab150951a (diff) | |
download | volse-hubzilla-f132436af3c90cff8dcef852bd836546311036f3.tar.gz volse-hubzilla-f132436af3c90cff8dcef852bd836546311036f3.tar.bz2 volse-hubzilla-f132436af3c90cff8dcef852bd836546311036f3.zip |
composer updates 2
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL')
13 files changed, 30 insertions, 87 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php index 3627991bf..715559df3 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php @@ -9,11 +9,9 @@ use Sabre\HTTP; class ACLMethodTest extends \PHPUnit\Framework\TestCase { - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ public function testCallback() { + $this->expectException('Sabre\DAV\Exception\BadRequest'); $acl = new Plugin(); $server = new DAV\Server(); $server->addPlugin(new DAV\Auth\Plugin()); @@ -23,11 +21,11 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase } /** - /** - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed + /** */ public function testNotSupportedByNode() { + $this->expectException('Sabre\DAV\Exception\MethodNotAllowed'); $tree = [ new DAV\SimpleCollection('test'), ]; @@ -64,11 +62,9 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase $this->assertFalse($acl->httpACL($server->httpRequest, $server->httpResponse)); } - /** - * @expectedException \Sabre\DAVACL\Exception\NotRecognizedPrincipal - */ public function testUnrecognizedPrincipal() { + $this->expectException('Sabre\DAVACL\Exception\NotRecognizedPrincipal'); $tree = [ new MockACLNode('test', []), ]; @@ -89,11 +85,9 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase $acl->httpACL($server->httpRequest, $server->httpResponse); } - /** - * @expectedException \Sabre\DAVACL\Exception\NotRecognizedPrincipal - */ public function testUnrecognizedPrincipal2() { + $this->expectException('Sabre\DAVACL\Exception\NotRecognizedPrincipal'); $tree = [ new MockACLNode('test', []), new DAV\SimpleCollection('principals', [ @@ -117,11 +111,9 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase $acl->httpACL($server->httpRequest, $server->httpResponse); } - /** - * @expectedException \Sabre\DAVACL\Exception\NotSupportedPrivilege - */ public function testUnknownPrivilege() { + $this->expectException('Sabre\DAVACL\Exception\NotSupportedPrivilege'); $tree = [ new MockACLNode('test', []), ]; @@ -142,11 +134,9 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase $acl->httpACL($server->httpRequest, $server->httpResponse); } - /** - * @expectedException \Sabre\DAVACL\Exception\NoAbstract - */ public function testAbstractPrivilege() { + $this->expectException('Sabre\DAVACL\Exception\NoAbstract'); $tree = [ new MockACLNode('test', []), ]; @@ -170,11 +160,9 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase $acl->httpACL($server->httpRequest, $server->httpResponse); } - /** - * @expectedException \Sabre\DAVACL\Exception\AceConflict - */ public function testUpdateProtectedPrivilege() { + $this->expectException('Sabre\DAVACL\Exception\AceConflict'); $oldACL = [ [ 'principal' => 'principals/notfound', @@ -203,11 +191,9 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase $acl->httpACL($server->httpRequest, $server->httpResponse); } - /** - * @expectedException \Sabre\DAVACL\Exception\AceConflict - */ public function testUpdateProtectedPrivilege2() { + $this->expectException('Sabre\DAVACL\Exception\AceConflict'); $oldACL = [ [ 'principal' => 'principals/notfound', @@ -236,11 +222,9 @@ class ACLMethodTest extends \PHPUnit\Framework\TestCase $acl->httpACL($server->httpRequest, $server->httpResponse); } - /** - * @expectedException \Sabre\DAVACL\Exception\AceConflict - */ public function testUpdateProtectedPrivilege3() { + $this->expectException('Sabre\DAVACL\Exception\AceConflict'); $oldACL = [ [ 'principal' => 'principals/notfound', diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php index 724abc685..04dd29c04 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php @@ -13,7 +13,7 @@ class AllowAccessTest extends \PHPUnit\Framework\TestCase */ protected $server; - public function setUp() + public function setup(): void { $nodes = [ new DAV\Mock\Collection('testdir', [ 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']); } diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php index d0b67cfae..8afe6d30f 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php @@ -7,8 +7,6 @@ namespace Sabre\DAVACL; use Sabre\DAV; use Sabre\HTTP; -require_once 'Sabre/HTTP/ResponseMock.php'; - class ExpandPropertiesTest extends \PHPUnit\Framework\TestCase { public function getServer() diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginAdminTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginAdminTest.php index 9ab16df74..048b9f249 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginAdminTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginAdminTest.php @@ -7,14 +7,11 @@ namespace Sabre\DAVACL; use Sabre\DAV; use Sabre\HTTP; -require_once 'Sabre/DAVACL/MockACLNode.php'; -require_once 'Sabre/HTTP/ResponseMock.php'; - class PluginAdminTest extends \PHPUnit\Framework\TestCase { public $server; - public function setUp() + public function setup(): void { $principalBackend = new PrincipalBackend\Mock(); diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php index 169629a03..e6796e014 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php @@ -72,11 +72,9 @@ class PluginUpdatePropertiesTest extends \PHPUnit\Framework\TestCase $this->assertEquals(['bar', 'baz'], $tree[0]->getGroupMemberSet()); } - /** - * @expectedException \Sabre\DAV\Exception - */ public function testSetBadValue() { + $this->expectException('Sabre\DAV\Exception'); $tree = [ new MockPrincipal('foo', 'foo'), ]; diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php index 95775d8fe..b18ab9488 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php @@ -10,7 +10,7 @@ abstract class AbstractPDOTest extends \PHPUnit\Framework\TestCase { use DAV\DbTestHelperTrait; - public function setUp() + public function setup(): void { $this->dropTables(['principals', 'groupmembers']); $this->createSchema('principals'); diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php index 551a77900..5f0434579 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php @@ -126,8 +126,7 @@ class Mock extends AbstractBackend * * Read the PropPatch documentation for more info and examples. * - * @param string $path - * @param \Sabre\DAV\PropPatch $propPatch + * @param string $path */ public function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch) { diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalCollectionTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalCollectionTest.php index 68aebe2ae..2777281a8 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalCollectionTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalCollectionTest.php @@ -33,10 +33,10 @@ class PrincipalCollectionTest extends \PHPUnit\Framework\TestCase /** * @depends testBasic - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed */ public function testGetChildrenDisable() { + $this->expectException('Sabre\DAV\Exception\MethodNotAllowed'); $backend = new PrincipalBackend\Mock(); $pc = new PrincipalCollection($backend); $pc->disableListing = true; diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php index 55c64721e..6883f25b4 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php @@ -7,8 +7,6 @@ namespace Sabre\DAVACL; use Sabre\DAV; use Sabre\HTTP; -require_once 'Sabre/HTTP/ResponseMock.php'; - class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase { public function getServer() diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php index b44b46fc5..ec834fe1a 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php @@ -7,8 +7,6 @@ namespace Sabre\DAVACL; use Sabre\DAV; use Sabre\HTTP; -require_once 'Sabre/HTTP/ResponseMock.php'; - class PrincipalSearchPropertySetTest extends \PHPUnit\Framework\TestCase { public function getServer() diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalTest.php index a4821da5a..7e1656a15 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalTest.php @@ -15,11 +15,9 @@ class PrincipalTest extends \PHPUnit\Framework\TestCase $this->assertTrue($principal instanceof Principal); } - /** - * @expectedException \Sabre\DAV\Exception - */ public function testConstructNoUri() { + $this->expectException('Sabre\DAV\Exception'); $principalBackend = new PrincipalBackend\Mock(); $principal = new Principal($principalBackend, []); } @@ -177,11 +175,9 @@ class PrincipalTest extends \PHPUnit\Framework\TestCase ], $principal->getACL()); } - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ public function testSetACl() { + $this->expectException('Sabre\DAV\Exception\Forbidden'); $principalBackend = new PrincipalBackend\Mock(); $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); $principal->setACL([]); diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php index a1e9ee36c..effa15838 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php @@ -7,9 +7,6 @@ namespace Sabre\DAVACL; use Sabre\DAV; use Sabre\HTTP; -require_once 'Sabre/DAVACL/MockPrincipal.php'; -require_once 'Sabre/DAVACL/MockACLNode.php'; - class SimplePluginTest extends \PHPUnit\Framework\TestCase { public function testValues() |