aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/memberlist.php2
-rw-r--r--tests/group/helper_test.php10
-rw-r--r--tests/notification/group_request_test.php5
3 files changed, 11 insertions, 6 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 67f535ad0c..eaaae4aaab 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1133,7 +1133,7 @@ switch ($mode)
$template->assign_vars(array(
'GROUP_DESC' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
- 'GROUP_NAME' => $group_helper->get_name($row['group_name']),
+ 'GROUP_NAME' => $group_helper->get_name($group_row['group_name']),
'GROUP_COLOR' => $group_row['group_colour'],
'GROUP_TYPE' => $user->lang['GROUP_IS_' . $group_row['l_group_type']],
'GROUP_RANK' => $user_rank_data['title'],
diff --git a/tests/group/helper_test.php b/tests/group/helper_test.php
index a325ac7ac9..2377a6f47c 100644
--- a/tests/group/helper_test.php
+++ b/tests/group/helper_test.php
@@ -45,15 +45,15 @@ class phpbb_group_helper_test extends phpbb_test_case
public function test_get_name()
{
// They should be totally fine
- $this->assertEquals('Bots', 'Bots');
- $this->assertEquals('Some new group', 'new_group');
- $this->assertEquals('Should work', 'group_with_ümlauts');
+ $this->assertEquals('Bots', $this->group_helper->get_name('Bots'));
+ $this->assertEquals('Some new group', $this->group_helper->get_name('new_group'));
+ $this->assertEquals('Should work', $this->group_helper->get_name('group_with_ümlauts'));
// This should fail (obviously)
- $this->assertNotEquals('They key does not contain uppercase letters', 'not_uppercase');
+ $this->assertNotEquals('They key does not contain uppercase letters', $this->group_helper->get_name('not_uppercase'));
// The key doesn't exist so just return group name...
- $this->assertEquals('Awesome group', 'Awesome group');
+ $this->assertEquals('Awesome group', $this->group_helper->get_name('Awesome group'));
}
protected function get_test_language_data_set()
diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php
index a24808fbbd..d16e198861 100644
--- a/tests/notification/group_request_test.php
+++ b/tests/notification/group_request_test.php
@@ -49,6 +49,11 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas
$this->user,
$this->cache->get_driver()
));
+ $this->container->set('group_helper', new \phpbb\group\helper(
+ new \phpbb\language\language(
+ new phpbb\language\language_file_loader($phpbb_root_path, $phpEx)
+ )
+ ));
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
$phpbb_log = new \phpbb\log\dummy();
$this->get_test_case_helpers()->set_s9e_services();