Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| phpbb_group_helper_get_name_test | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| test_get_name | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | require_once __DIR__ . '/helper_test_case.php'; |
| 15 | |
| 16 | class phpbb_group_helper_get_name_test extends phpbb_group_helper_test_case |
| 17 | { |
| 18 | public function test_get_name() |
| 19 | { |
| 20 | // They should be totally fine |
| 21 | $this->assertEquals('Bots', $this->group_helper->get_name('Bots')); |
| 22 | $this->assertEquals('Some new group', $this->group_helper->get_name('new_group')); |
| 23 | $this->assertEquals('Should work', $this->group_helper->get_name('group_with_ümlauts')); |
| 24 | |
| 25 | // This should fail (obviously) |
| 26 | $this->assertNotEquals('The key does not contain uppercase letters', $this->group_helper->get_name('not_uppercase')); |
| 27 | |
| 28 | // The key doesn't exist so just return group name... |
| 29 | $this->assertEquals('Awesome group', $this->group_helper->get_name('Awesome group')); |
| 30 | } |
| 31 | } |