1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2020-08-12 21:47:12 +02:00
2 changed files with 48 additions and 35 deletions

View File

@@ -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));
}
}