diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-05-11 05:54:20 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-05-11 05:54:20 -0400 |
commit | d968fc51eab8b0fb259ecbeae517056b99554017 (patch) | |
tree | 10e551cff9fefbefbfd7e5031b57320116bb7fce /vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php | |
parent | c7698e4dc388b7d9a9db368672cb057c1d4d3a01 (diff) | |
parent | 4dd3839c41e18d9724855e7955d8737b6f52dcd6 (diff) | |
download | volse-hubzilla-d968fc51eab8b0fb259ecbeae517056b99554017.tar.gz volse-hubzilla-d968fc51eab8b0fb259ecbeae517056b99554017.tar.bz2 volse-hubzilla-d968fc51eab8b0fb259ecbeae517056b99554017.zip |
Merge remote-tracking branch 'upstream/dev' into plugin-repo
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php | 64 |
1 files changed, 24 insertions, 40 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php index 53568654f..64cedd142 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php @@ -10,7 +10,7 @@ require_once 'Sabre/DAVACL/MockPrincipal.php'; class PluginUpdatePropertiesTest extends \PHPUnit_Framework_TestCase { - public function testUpdatePropertiesPassthrough() { + function testUpdatePropertiesPassthrough() { $tree = array( new DAV\SimpleCollection('foo'), @@ -23,17 +23,14 @@ class PluginUpdatePropertiesTest extends \PHPUnit_Framework_TestCase { )); $expected = array( - 'href' => 'foo', - '403' => array( - '{DAV:}foo' => null, - ), + '{DAV:}foo' => 403, ); $this->assertEquals($expected, $result); } - public function testRemoveGroupMembers() { + function testRemoveGroupMembers() { $tree = array( new MockPrincipal('foo','foo'), @@ -46,10 +43,7 @@ class PluginUpdatePropertiesTest extends \PHPUnit_Framework_TestCase { )); $expected = array( - 'href' => 'foo', - '200' => array( - '{DAV:}group-member-set' => null, - ), + '{DAV:}group-member-set' => 204 ); $this->assertEquals($expected, $result); @@ -57,34 +51,31 @@ class PluginUpdatePropertiesTest extends \PHPUnit_Framework_TestCase { } - public function testSetGroupMembers() { + function testSetGroupMembers() { - $tree = array( + $tree = [ new MockPrincipal('foo','foo'), - ); + ]; $server = new DAV\Server($tree); $server->addPlugin(new Plugin()); - $result = $server->updateProperties('foo', array( - '{DAV:}group-member-set' => new DAV\Property\HrefList(array('/bar','/baz'), true), - )); + $result = $server->updateProperties('foo', [ + '{DAV:}group-member-set' => new DAV\Xml\Property\Href(['/bar','/baz'], true), + ]); - $expected = array( - 'href' => 'foo', - '200' => array( - '{DAV:}group-member-set' => null, - ), - ); + $expected = [ + '{DAV:}group-member-set' => 200 + ]; $this->assertEquals($expected, $result); - $this->assertEquals(array('bar','baz'),$tree[0]->getGroupMemberSet()); + $this->assertEquals(['bar', 'baz'],$tree[0]->getGroupMemberSet()); } /** * @expectedException Sabre\DAV\Exception */ - public function testSetBadValue() { + function testSetBadValue() { $tree = array( new MockPrincipal('foo','foo'), @@ -98,28 +89,21 @@ class PluginUpdatePropertiesTest extends \PHPUnit_Framework_TestCase { } - public function testSetBadNode() { + function testSetBadNode() { - $tree = array( + $tree = [ new DAV\SimpleCollection('foo'), - ); + ]; $server = new DAV\Server($tree); $server->addPlugin(new Plugin()); - $result = $server->updateProperties('foo', array( - '{DAV:}group-member-set' => new DAV\Property\HrefList(array('/bar','/baz'),false), - '{DAV:}bar' => 'baz', - )); + $result = $server->updateProperties('foo', [ + '{DAV:}group-member-set' => new DAV\Xml\Property\Href(['/bar','/baz'],false), + ]); - $expected = array( - 'href' => 'foo', - '403' => array( - '{DAV:}group-member-set' => null, - ), - '424' => array( - '{DAV:}bar' => null, - ), - ); + $expected = [ + '{DAV:}group-member-set' => 403, + ]; $this->assertEquals($expected, $result); |