public function testRemoveUsedGroup()
 {
     // on detruit un groupe qui a des users
     // on ajoute d'abord un user dans un groupe
     jAcl2DbUserGroup::addUserToGroup('max', $this->grpId3);
     $this->usergroups = array(array('login' => 'laurent', 'id_aclgrp' => $this->grpId5), array('login' => 'max', 'id_aclgrp' => $this->grpId6), array('login' => 'max', 'id_aclgrp' => $this->defaultGroupId), array('login' => 'max', 'id_aclgrp' => $this->grpId3));
     $this->assertTableContainsRecords('jacl2_user_group', $this->usergroups);
     // ok maintenant on supprime le groupe
     jAcl2DbUserGroup::removeGroup($this->grpId3);
     $this->usergroups = array(array('login' => 'laurent', 'id_aclgrp' => $this->grpId5), array('login' => 'max', 'id_aclgrp' => $this->grpId6), array('login' => 'max', 'id_aclgrp' => $this->defaultGroupId));
     $this->assertTableContainsRecords('jacl2_user_group', $this->usergroups);
     unset($this->groups[2]);
     $this->assertTableContainsRecords('jacl2_group', $this->groups);
 }
 function delgroup()
 {
     $rep = $this->getResponse('redirect');
     $rep->action = 'jacl2db_admin~groups:index';
     jAcl2DbUserGroup::removeGroup($this->param('group_id'));
     jMessage::add(jLocale::get('acl2.message.group.delete.ok'), 'ok');
     return $rep;
 }
 function delgroup()
 {
     $rep = $this->getResponse('redirect');
     $rep->action = 'jacl2_admin~groups:index';
     jAcl2DbUserGroup::removeGroup($this->param('group_id'));
     return $rep;
 }