/** * test deleting groupmembers * */ public function testRemoveGroupMember() { $group = $this->_groupLDAP->getGroupByName('tine20phpunit'); $this->objects['initialAccount']->accountPrimaryGroup = $group->getId(); try { $user = $this->_userLDAP->addUser($this->objects['initialAccount']); } catch (Exception $e) { $user = $this->_userLDAP->getUserByLoginName($this->objects['initialAccount']->accountLoginName); } $this->_groupLDAP->addGroupMember($group, $user); $this->_groupLDAP->removeGroupMember($group, $user); $groupMembers = $this->_groupLDAP->getGroupMembers($group); $this->assertEquals(0, count($groupMembers)); $this->_userLDAP->deleteUser($user); }