mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Merge branch '3.3.x'
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
|
||||
class phpbb_dbal_migrator_tool_permission_test extends phpbb_database_test_case
|
||||
{
|
||||
/** @var \phpbb\auth\auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var \phpbb\db\migration\tool\permission */
|
||||
protected $tool;
|
||||
|
||||
public $group_ids = array(
|
||||
'REGISTERED' => 2,
|
||||
'GLOBAL_MODERATORS' => 4,
|
||||
@@ -218,4 +224,22 @@ class phpbb_dbal_migrator_tool_permission_test extends phpbb_database_test_case
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function data_test_permission_role_exists()
|
||||
{
|
||||
return array(
|
||||
array('ROLE_MOD_FULL', true),
|
||||
array('ROLE_USER_FULL', true),
|
||||
array('ROLE_ADMIN_STANDARD', true),
|
||||
array('ROLE_DOES_NOT_EXIST', false),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider data_test_permission_role_exists
|
||||
*/
|
||||
public function test_permission_role_exists($role_name, $expected)
|
||||
{
|
||||
$this->assertEquals($expected, $this->tool->role_exists($role_name));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user