diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-12-04 13:36:23 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-12-04 13:36:23 +0100 |
commit | 0f4124127306408b3560aace31d55864b0043697 (patch) | |
tree | 609c7a5fc3d0fb0f6d9f62760304c16730ef1382 /tests | |
parent | 70e47bc9290ff0ce54b53374f703a3574c54325c (diff) | |
download | forums-0f4124127306408b3560aace31d55864b0043697.tar forums-0f4124127306408b3560aace31d55864b0043697.tar.gz forums-0f4124127306408b3560aace31d55864b0043697.tar.bz2 forums-0f4124127306408b3560aace31d55864b0043697.tar.xz forums-0f4124127306408b3560aace31d55864b0043697.zip |
[ticket/12056] validate_config_vars: Fix "Creating ... from empty value".
PHPBB3-12056
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functions_acp/validate_config_vars_test.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/functions_acp/validate_config_vars_test.php b/tests/functions_acp/validate_config_vars_test.php index 7cd7fa3892..5ccd73fe8d 100644 --- a/tests/functions_acp/validate_config_vars_test.php +++ b/tests/functions_acp/validate_config_vars_test.php @@ -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); |