/**
  * test setting no group members
  *
  */
 public function testSetNoGroupMembers()
 {
     $group = $this->testAddGroup();
     $this->objects['initialAccount']->accountPrimaryGroup = $group->getId();
     $user = $this->_userLDAP->addUser($this->objects['initialAccount']);
     $this->objects['users']->addRecord($user);
     $this->_groupLDAP->setGroupMembers($group, array($user));
     $this->_groupLDAP->setGroupMembers($group, array());
     $groupMembers = $this->_groupLDAP->getGroupMembers($group);
     $this->assertEquals(0, count($groupMembers));
     $this->_userLDAP->deleteUser($user);
 }
 /**
  * test setting no group members
  *
  */
 public function testSetNoGroupMembers()
 {
     $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->setGroupMembers($group, array($user));
     $this->_groupLDAP->setGroupMembers($group, array());
     $groupMembers = $this->_groupLDAP->getGroupMembers($group);
     $this->assertEquals(0, count($groupMembers));
     $this->_userLDAP->deleteUser($user);
 }