mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 12:14:06 +02:00
[ticket/15886] Group helper functions
PHPBB3-15886
This commit is contained in:
31
tests/group/helper_get_name_test.php
Normal file
31
tests/group/helper_get_name_test.php
Normal file
@@ -0,0 +1,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'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user