aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-10-27 12:25:41 -0700
committerNils Adermann <naderman@naderman.de>2014-10-27 12:25:41 -0700
commitb1d738607563d0bc43bc7e93f81165a3bed6bfa8 (patch)
tree2d58634cab7759b002eb5d71737dce92c427c801 /tests/functional
parent222bec0204fa600bd72df3bba8fc45131af41c83 (diff)
parentd693d91e26e3200916b0f7fd475de1e968a43fee (diff)
downloadforums-b1d738607563d0bc43bc7e93f81165a3bed6bfa8.tar
forums-b1d738607563d0bc43bc7e93f81165a3bed6bfa8.tar.gz
forums-b1d738607563d0bc43bc7e93f81165a3bed6bfa8.tar.bz2
forums-b1d738607563d0bc43bc7e93f81165a3bed6bfa8.tar.xz
forums-b1d738607563d0bc43bc7e93f81165a3bed6bfa8.zip
Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0: [ticket/13230] Add missing globals and missing request object for path helper [ticket/13226] Add functional test for group ranks [ticket/13226] Fix the usage of $rank_img
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/memberlist_test.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/functional/memberlist_test.php b/tests/functional/memberlist_test.php
index c76ba6e37d..1da5c39401 100644
--- a/tests/functional/memberlist_test.php
+++ b/tests/functional/memberlist_test.php
@@ -106,4 +106,32 @@ class phpbb_functional_memberlist_test extends phpbb_functional_test_case
$this->assertContains('admin', $crawler->eq(0)->text());
$this->assertNotContains('admin', $crawler->eq(1)->text());
}
+
+ public function test_group_rank()
+ {
+ copy(__DIR__ . '/fixtures/files/valid.jpg', __DIR__ . '/../../phpBB/images/ranks/valid.jpg');
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang(array('acp/groups', 'acp/posting'));
+
+ // Set a group rank to the registered users
+ $crawler = self::request('GET', "adm/index.php?sid={$this->sid}&i=acp_groups&mode=manage&action=edit&g=2");
+ $form = $crawler->selectButton('Submit')->form();
+ $form['group_rank']->select('1');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('GROUP_UPDATED', $crawler->filter('.successbox')->text());
+
+ // Set a rank image for site_admin
+ $crawler = self::request('GET', "adm/index.php?sid={$this->sid}&i=acp_ranks&mode=ranks&action=edit&id=1");
+ $form = $crawler->selectButton('Submit')->form();
+ $form['rank_image']->select('valid.jpg');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('RANK_UPDATED', $crawler->filter('.successbox')->text());
+
+ $crawler = self::request('GET', 'memberlist.php?mode=group&g=2');
+ $this->assertContains('memberlist-test-user', $crawler->text());
+
+ unlink(__DIR__ . '/../../phpBB/images/ranks/valid.jpg');
+ }
}