function testUpdatePrincipalUnknownField() { $pdo = $this->getPDO(); $backend = new Sabre_DAVACL_PrincipalBackend_PDO($pdo); $result = $backend->updatePrincipal('principals/user', array('{DAV:}displayname' => 'pietje', '{http://sabredav.org/ns}vcard-url' => 'blabla', '{DAV:}unknown' => 'foo')); $this->assertEquals(array(424 => array('{DAV:}displayname' => null, '{http://sabredav.org/ns}vcard-url' => null), 403 => array('{DAV:}unknown' => null)), $result); $this->assertEquals(array('id' => '1', 'uri' => 'principals/user', '{DAV:}displayname' => 'User', '{http://sabredav.org/ns}email-address' => '*****@*****.**'), $backend->getPrincipalByPath('principals/user')); }
function testSetGroupMemberSet() { $pdo = $this->getPDO(); // Start situation $backend = new Sabre_DAVACL_PrincipalBackend_PDO($pdo); $this->assertEquals(array('principals/user'), $backend->getGroupMemberSet('principals/group')); // Removing all principals $backend->setGroupMemberSet('principals/group', array()); $this->assertEquals(array(), $backend->getGroupMemberSet('principals/group')); // Adding principals again $backend->setGroupMemberSet('principals/group', array('principals/user')); $this->assertEquals(array('principals/user'), $backend->getGroupMemberSet('principals/group')); }