From afd97a449bd37efe0aae1e15f3126796b0dd6c78 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 30 Aug 2018 11:12:15 -0600 Subject: [PATCH] Some documentation updates --- admin/tests/GroupCommandTest.php | 15 +++++++++++++-- admin/tests/UserCommandTest.php | 5 ++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/admin/tests/GroupCommandTest.php b/admin/tests/GroupCommandTest.php index e16e0ec9bf..f0f64f0992 100644 --- a/admin/tests/GroupCommandTest.php +++ b/admin/tests/GroupCommandTest.php @@ -1,8 +1,11 @@ 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() { @@ -138,6 +147,8 @@ class GroupCommandTest extends CommandBase { /** * Test adding & removing a new member + * + * @depends UserCommandTest::testAddUser */ public function testChangeMembers() { @@ -191,7 +202,7 @@ class GroupCommandTest extends CommandBase { $command = new admin_cmd_edit_group($this->group_id, $account); $command->comment = 'Needed for unit test ' . $this->getName(); $command->run(); - + // Check $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'); diff --git a/admin/tests/UserCommandTest.php b/admin/tests/UserCommandTest.php index abe308253d..7d9f952008 100644 --- a/admin/tests/UserCommandTest.php +++ b/admin/tests/UserCommandTest.php @@ -1,7 +1,10 @@