diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2013-06-04 17:59:50 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2013-06-04 17:59:50 +0200 |
| commit | 0aa964786d8a6fc677ebd62cd7533fa3bf045730 (patch) | |
| tree | 135c664a0280c32d0f28edb11d0376424e7de684 | |
| parent | 27bcf25c3b944cd8448ed666f42f7c00ca5066bc (diff) | |
| parent | 7b7747cab687c0c2eae05d67110a1e09e1d528be (diff) | |
| download | forums-0aa964786d8a6fc677ebd62cd7533fa3bf045730.tar forums-0aa964786d8a6fc677ebd62cd7533fa3bf045730.tar.gz forums-0aa964786d8a6fc677ebd62cd7533fa3bf045730.tar.bz2 forums-0aa964786d8a6fc677ebd62cd7533fa3bf045730.tar.xz forums-0aa964786d8a6fc677ebd62cd7533fa3bf045730.zip | |
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11587
| -rw-r--r-- | tests/functional/common_groups_test.php | 6 | ||||
| -rw-r--r-- | tests/functional/memberlist_test.php | 12 | ||||
| -rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 4 |
3 files changed, 14 insertions, 8 deletions
diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php index cc6afa54b9..7ccd78421e 100644 --- a/tests/functional/common_groups_test.php +++ b/tests/functional/common_groups_test.php @@ -30,12 +30,6 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test */ public function test_groups_manage($input, $expected) { - $this->markTestIncomplete( - 'Test fails on develop due to another test deleting the Administrators group.' - ); - // See https://github.com/phpbb/phpbb3/pull/1407#issuecomment-18465480 - // and https://gist.github.com/bantu/22dc4f6c6c0b8f9e0fa1 - $this->login(); $this->admin_login(); $this->add_lang(array('ucp', 'acp/groups')); diff --git a/tests/functional/memberlist_test.php b/tests/functional/memberlist_test.php index 92ede8bd04..e9739f5f9a 100644 --- a/tests/functional/memberlist_test.php +++ b/tests/functional/memberlist_test.php @@ -95,5 +95,17 @@ class phpbb_functional_memberlist_test extends phpbb_functional_test_case $crawler = $this->get_memberlist_leaders_table_crawler(); $this->assertNotContains('memberlist-test-moderator', $crawler->eq(0)->text()); $this->assertContains('memberlist-test-moderator', $crawler->eq(1)->text()); + + // Add admin to moderators, should be visible as moderator + $this->add_user_group('GLOBAL_MODERATORS', array('admin'), true); + $crawler = $this->get_memberlist_leaders_table_crawler(); + $this->assertNotContains('admin', $crawler->eq(0)->text()); + $this->assertContains('admin', $crawler->eq(1)->text()); + + // Add admin to admins as leader, should be visible as admin, not moderator + $this->add_user_group('ADMINISTRATORS', array('admin'), true, true); + $crawler = $this->get_memberlist_leaders_table_crawler(); + $this->assertContains('admin', $crawler->eq(0)->text()); + $this->assertNotContains('admin', $crawler->eq(1)->text()); } } diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 660234f3ed..923cb16d37 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -361,7 +361,7 @@ class phpbb_functional_test_case extends phpbb_test_case return group_user_del($group_id, false, $usernames, $group_name); } - protected function add_user_group($group_name, $usernames) + protected function add_user_group($group_name, $usernames, $default = false, $leader = false) { global $db, $cache, $auth, $config, $phpbb_dispatcher, $phpbb_log, $phpbb_container, $phpbb_root_path, $phpEx; @@ -400,7 +400,7 @@ class phpbb_functional_test_case extends phpbb_test_case $group_id = (int) $db->sql_fetchfield('group_id'); $db->sql_freeresult($result); - return group_user_add($group_id, false, $usernames, $group_name); + return group_user_add($group_id, false, $usernames, $group_name, $default, $leader); } protected function login($username = 'admin') |
