Some documentation updates

This commit is contained in:
nathangray 2018-08-30 11:12:15 -06:00
parent 79af5c31fd
commit afd97a449b
2 changed files with 17 additions and 3 deletions

View File

@ -1,8 +1,11 @@
<?php <?php
/** /**
* Tests for ACL command * Tests for edit group command
* *
* It would be good to check to see if the hooks get called, but that's impossible
* with static hook calls.
*
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @author Nathan Gray * @author Nathan Gray
* @copyright (c) 2018 Nathan Gray * @copyright (c) 2018 Nathan Gray
@ -29,6 +32,12 @@ class GroupCommandTest extends CommandBase {
{ {
// Can't set this until now - value is not available // Can't set this until now - value is not available
$this->group['account_members'] = array($GLOBALS['egw_info']['user']['account_id']); $this->group['account_members'] = array($GLOBALS['egw_info']['user']['account_id']);
if(($account_id = $GLOBALS['egw']->accounts->name2id($this->group['account_lid'])))
{
// Delete if there in case something went wrong
$GLOBALS['egw']->accounts->delete($account_id);
}
} }
public function tearDown() public function tearDown()
{ {
@ -138,6 +147,8 @@ class GroupCommandTest extends CommandBase {
/** /**
* Test adding & removing a new member * Test adding & removing a new member
*
* @depends UserCommandTest::testAddUser
*/ */
public function testChangeMembers() public function testChangeMembers()
{ {
@ -191,7 +202,7 @@ class GroupCommandTest extends CommandBase {
$command = new admin_cmd_edit_group($this->group_id, $account); $command = new admin_cmd_edit_group($this->group_id, $account);
$command->comment = 'Needed for unit test ' . $this->getName(); $command->comment = 'Needed for unit test ' . $this->getName();
$command->run(); $command->run();
// Check // Check
$post_search = $GLOBALS['egw']->accounts->search(array('type' => 'both')); $post_search = $GLOBALS['egw']->accounts->search(array('type' => 'both'));
$this->assertEquals(count($pre_search), count($post_search), 'Should have same number of accounts as before'); $this->assertEquals(count($pre_search), count($post_search), 'Should have same number of accounts as before');

View File

@ -1,7 +1,10 @@
<?php <?php
/** /**
* Tests for ACL command * Tests for edit user command
*
* It would be good to check to see if the hooks get called, but that's impossible
* with static hook calls.
* *
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @author Nathan Gray * @author Nathan Gray