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/PluginUpdatePropertiesTest.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/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); |