1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 12:14:06 +02:00

Merge branch '3.1.x' into 3.2.x

Conflicts:
	phpBB/phpbb/db/migration/tool/module.php
This commit is contained in:
Marc Alexander
2016-08-31 21:41:17 +02:00
4 changed files with 211 additions and 67 deletions

View File

@@ -121,6 +121,44 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
$this->fail($e);
}
$this->assertEquals(true, $this->tool->exists('acp', 'ACP_NEW_CAT', 'ACP_NEW_MODULE'));
// Test adding module when plural parent module_langname exists
// PHPBB3-14703
// Adding fail
try
{
$this->tool->add('acp', 'ACP_FORUM_BASED_PERMISSIONS', array(
'module_basename' => 'acp_new_permissions_module',
'module_langname' => 'ACP_NEW_PERMISSIONS_MODULE',
'module_mode' => 'test',
'module_auth' => '',
));
$this->fail('Exception not thrown');
}
catch (Exception $e)
{
$this->assertEquals('phpbb\db\migration\exception', get_class($e));
$this->assertEquals('MODULE_EXIST_MULTIPLE', $e->getMessage());
}
// Test adding module when plural parent module_langname exists
// PHPBB3-14703
// Adding success
try
{
$this->tool->add('acp', 'ACP_FORUM_BASED_PERMISSIONS', array(
'module_basename' => 'acp_new_permissions_module',
'module_langname' => 'ACP_NEW_PERMISSIONS_MODULE',
'module_mode' => 'test',
'module_auth' => '',
'after' => 'ACP_FORUM_BASED_PERMISSIONS_CHILD_1',
));
}
catch (Exception $e)
{
$this->fail($e);
}
$this->assertEquals(true, $this->tool->exists('acp', 'ACP_FORUM_BASED_PERMISSIONS', 'ACP_NEW_PERMISSIONS_MODULE'));
}
public function test_remove()