mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[ticket/12056] validate_config_vars: Fix "Creating ... from empty value".
PHPBB3-12056
This commit is contained in:
parent
70e47bc929
commit
0f41241273
1 changed files with 10 additions and 8 deletions
|
@ -11,6 +11,16 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
|
|||
|
||||
class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
global $user;
|
||||
|
||||
$user = new phpbb_mock_user();
|
||||
$user->lang = new phpbb_mock_lang();
|
||||
}
|
||||
|
||||
/**
|
||||
* Data sets that don't throw an error.
|
||||
*/
|
||||
|
@ -60,10 +70,6 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
|
|||
*/
|
||||
public function test_validate_config_vars_fit($test_data, $cfg_array)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$user->lang = new phpbb_mock_lang();
|
||||
|
||||
$phpbb_error = array();
|
||||
validate_config_vars($test_data, $cfg_array, $phpbb_error);
|
||||
|
||||
|
@ -146,10 +152,6 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
|
|||
*/
|
||||
public function test_validate_config_vars_error($test_data, $cfg_array, $expected)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$user->lang = new phpbb_mock_lang();
|
||||
|
||||
$phpbb_error = array();
|
||||
validate_config_vars($test_data, $cfg_array, $phpbb_error);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue