blob: b39b2cbedd1f622cb86cff5ff99bcd46aaf629a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
require_once dirname(__FILE__) . '/helper_test_case.php';
class phpbb_group_helper_get_name_test extends phpbb_group_helper_test_case
{
public function test_get_name()
{
// They should be totally fine
$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('The 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', $this->group_helper->get_name('Awesome group'));
}
}
|