diff options
author | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
commit | 0b02a6d123b2014705998c94ddf3d460948d3eac (patch) | |
tree | 78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php | |
parent | 40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff) | |
download | volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2 volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip |
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php index 04ed5c330..fb73cc16a 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php @@ -30,6 +30,11 @@ class SimplePluginTest extends \PHPUnit_Framework_TestCase { $this->assertEquals(array('ACL'), $aclPlugin->getMethods('')); + + $this->assertEquals( + 'acl', + $aclPlugin->getPluginInfo()['name'] + ); } function testGetFlatPrivilegeSet() { @@ -55,15 +60,15 @@ class SimplePluginTest extends \PHPUnit_Framework_TestCase { ), '{DAV:}read-acl' => array( 'privilege' => '{DAV:}read-acl', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}read', + 'concrete' => '{DAV:}read-acl', ), '{DAV:}read-current-user-privilege-set' => array( 'privilege' => '{DAV:}read-current-user-privilege-set', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}read', + 'concrete' => '{DAV:}read-current-user-privilege-set', ), '{DAV:}write' => array( 'privilege' => '{DAV:}write', @@ -80,39 +85,39 @@ class SimplePluginTest extends \PHPUnit_Framework_TestCase { ), '{DAV:}write-acl' => array( 'privilege' => '{DAV:}write-acl', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}write', + 'concrete' => '{DAV:}write-acl', ), '{DAV:}write-properties' => array( 'privilege' => '{DAV:}write-properties', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}write', + 'concrete' => '{DAV:}write-properties', ), '{DAV:}write-content' => array( 'privilege' => '{DAV:}write-content', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}write', + 'concrete' => '{DAV:}write-content', ), '{DAV:}unlock' => array( 'privilege' => '{DAV:}unlock', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}write', + 'concrete' => '{DAV:}unlock', ), '{DAV:}bind' => array( 'privilege' => '{DAV:}bind', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}write', + 'concrete' => '{DAV:}bind', ), '{DAV:}unbind' => array( 'privilege' => '{DAV:}unbind', - 'abstract' => true, + 'abstract' => false, 'aggregates' => array(), - 'concrete' => '{DAV:}write', + 'concrete' => '{DAV:}unbind', ), ); @@ -148,11 +153,11 @@ class SimplePluginTest extends \PHPUnit_Framework_TestCase { $server = new DAV\Server($tree); $server->addPlugin($acl); - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock(),'SabreDAV'); + $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); $server->addPlugin($auth); //forcing login - $auth->beforeMethod('GET','/'); + $auth->beforeMethod(new HTTP\Request(), new HTTP\Response()); $this->assertEquals(array('principals/admin'),$acl->getCurrentUserPrincipals()); @@ -175,11 +180,11 @@ class SimplePluginTest extends \PHPUnit_Framework_TestCase { $server = new DAV\Server($tree); $server->addPlugin($acl); - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock(),'SabreDAV'); + $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); $server->addPlugin($auth); //forcing login - $auth->beforeMethod('GET','/'); + $auth->beforeMethod(new HTTP\Request(), new HTTP\Response()); $expected = array( 'principals/admin', @@ -252,11 +257,11 @@ class SimplePluginTest extends \PHPUnit_Framework_TestCase { $aclPlugin = new Plugin(); $server->addPlugin($aclPlugin); - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock(),'SabreDAV'); + $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); $server->addPlugin($auth); //forcing login - $auth->beforeMethod('GET','/'); + $auth->beforeMethod(new HTTP\Request(), new HTTP\Response()); $expected = array( '{DAV:}write', @@ -306,7 +311,7 @@ class SimplePluginTest extends \PHPUnit_Framework_TestCase { $aclPlugin = new Plugin(); $server->addPlugin($aclPlugin); - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock(),'SabreDAV'); + $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); $server->addPlugin($auth); //forcing login |