blob: c3d136de49d6b6126088fe7d8f79814634ed956b (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<?php
/**
*
* @package testing
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* @group functional
*/
class phpbb_functional_extension_permission_lang_test extends phpbb_functional_test_case
{
protected $phpbb_extension_manager;
public function setUp()
{
parent::setUp();
$this->phpbb_extension_manager = $this->get_extension_manager();
$this->purge_cache();
$this->login();
$this->admin_login();
$this->add_lang('acp/permissions');
}
public function test_auto_include_permission_lang_from_extensions()
{
$this->phpbb_extension_manager->enable('foo/bar');
// User permissions
$crawler = $this->request('GET', 'adm/index.php?i=acp_permissions&icat=16&mode=setting_user_global&sid=' . $this->sid);
$this->assert_response_success();
$this->assertContains('Can view foo', $this->client->getResponse()->getContent());
}
public function permissions_data()
{
return array(
// description
// permission type
// permission name
// mode
// object name
// object id
array(
'user permission',
'u_',
'acl_u_foo',
'setting_user_global',
'user_id',
2,
),
);
}
}
|