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) --- .../sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php | 86 ++++++++++------------ 1 file changed, 38 insertions(+), 48 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php index 7d7a54d06..3627991bf 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php @@ -1,38 +1,39 @@ addPlugin(new DAV\Auth\Plugin()); $server->addPlugin($acl); $acl->httpAcl($server->httpRequest, $server->httpResponse); - } /** /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed + * @expectedException \Sabre\DAV\Exception\MethodNotAllowed */ - function testNotSupportedByNode() { - + public function testNotSupportedByNode() + { $tree = [ new DAV\SimpleCollection('test'), ]; $acl = new Plugin(); $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request(); + $server->httpRequest = new HTTP\Request('GET', '/'); $body = ' '; @@ -41,17 +42,16 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } - function testSuccessSimple() { - + public function testSuccessSimple() + { $tree = [ new MockACLNode('test', []), ]; $acl = new Plugin(); $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request(); + $server->httpRequest = new HTTP\Request('GET', '/'); $server->httpRequest->setUrl('/test'); $body = ' @@ -62,14 +62,13 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $this->assertFalse($acl->httpACL($server->httpRequest, $server->httpResponse)); - } /** - * @expectedException Sabre\DAVACL\Exception\NotRecognizedPrincipal + * @expectedException \Sabre\DAVACL\Exception\NotRecognizedPrincipal */ - function testUnrecognizedPrincipal() { - + public function testUnrecognizedPrincipal() + { $tree = [ new MockACLNode('test', []), ]; @@ -88,14 +87,13 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } /** - * @expectedException Sabre\DAVACL\Exception\NotRecognizedPrincipal + * @expectedException \Sabre\DAVACL\Exception\NotRecognizedPrincipal */ - function testUnrecognizedPrincipal2() { - + public function testUnrecognizedPrincipal2() + { $tree = [ new MockACLNode('test', []), new DAV\SimpleCollection('principals', [ @@ -117,14 +115,13 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } /** - * @expectedException Sabre\DAVACL\Exception\NotSupportedPrivilege + * @expectedException \Sabre\DAVACL\Exception\NotSupportedPrivilege */ - function testUnknownPrivilege() { - + public function testUnknownPrivilege() + { $tree = [ new MockACLNode('test', []), ]; @@ -143,20 +140,19 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } /** - * @expectedException Sabre\DAVACL\Exception\NoAbstract + * @expectedException \Sabre\DAVACL\Exception\NoAbstract */ - function testAbstractPrivilege() { - + public function testAbstractPrivilege() + { $tree = [ new MockACLNode('test', []), ]; $acl = new Plugin(); $server = new DAV\Server($tree); - $server->on('getSupportedPrivilegeSet', function($node, &$supportedPrivilegeSet) { + $server->on('getSupportedPrivilegeSet', function ($node, &$supportedPrivilegeSet) { $supportedPrivilegeSet['{DAV:}foo'] = ['abstract' => true]; }); $server->httpRequest = new HTTP\Request('ACL', '/test'); @@ -172,14 +168,13 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } /** - * @expectedException Sabre\DAVACL\Exception\AceConflict + * @expectedException \Sabre\DAVACL\Exception\AceConflict */ - function testUpdateProtectedPrivilege() { - + public function testUpdateProtectedPrivilege() + { $oldACL = [ [ 'principal' => 'principals/notfound', @@ -206,14 +201,13 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } /** - * @expectedException Sabre\DAVACL\Exception\AceConflict + * @expectedException \Sabre\DAVACL\Exception\AceConflict */ - function testUpdateProtectedPrivilege2() { - + public function testUpdateProtectedPrivilege2() + { $oldACL = [ [ 'principal' => 'principals/notfound', @@ -240,14 +234,13 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } /** - * @expectedException Sabre\DAVACL\Exception\AceConflict + * @expectedException \Sabre\DAVACL\Exception\AceConflict */ - function testUpdateProtectedPrivilege3() { - + public function testUpdateProtectedPrivilege3() + { $oldACL = [ [ 'principal' => 'principals/notfound', @@ -274,11 +267,10 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin($acl); $acl->httpACL($server->httpRequest, $server->httpResponse); - } - function testSuccessComplex() { - + public function testSuccessComplex() + { $oldACL = [ [ 'principal' => 'principals/foo', @@ -317,7 +309,6 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { $server->addPlugin(new DAV\Auth\Plugin()); $server->addPlugin($acl); - $this->assertFalse($acl->httpAcl($server->httpRequest, $server->httpResponse)); $this->assertEquals([ @@ -332,6 +323,5 @@ class ACLMethodTest extends \PHPUnit_Framework_TestCase { 'protected' => false, ], ], $node->getACL()); - } } -- cgit v1.2.3