diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-12-04 13:31:12 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-12-04 13:31:12 +0100 |
commit | c07b44716c87ca2c74b49fd37b7fe7381f6a3769 (patch) | |
tree | 739e05d365e65c661bd2c7db14df525a132e12db /tests/functions_acp | |
parent | c659fe4cbe1e80b7d1ed7c46815ce2573412fd6b (diff) | |
download | forums-c07b44716c87ca2c74b49fd37b7fe7381f6a3769.tar forums-c07b44716c87ca2c74b49fd37b7fe7381f6a3769.tar.gz forums-c07b44716c87ca2c74b49fd37b7fe7381f6a3769.tar.bz2 forums-c07b44716c87ca2c74b49fd37b7fe7381f6a3769.tar.xz forums-c07b44716c87ca2c74b49fd37b7fe7381f6a3769.zip |
[ticket/12056] build_select: Fix "Creating default object from empty value"
PHPBB3-12056
Diffstat (limited to 'tests/functions_acp')
-rw-r--r-- | tests/functions_acp/build_select_test.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/functions_acp/build_select_test.php b/tests/functions_acp/build_select_test.php index aca49b7655..c44fd97ec3 100644 --- a/tests/functions_acp/build_select_test.php +++ b/tests/functions_acp/build_select_test.php @@ -11,6 +11,16 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_built_select_test extends phpbb_test_case { + protected function setUp() + { + parent::setUp(); + + global $user; + + $user = new phpbb_mock_user(); + $user->lang = new phpbb_mock_lang(); + } + public function build_select_data() { return array( @@ -46,10 +56,6 @@ class phpbb_functions_acp_built_select_test extends phpbb_test_case */ public function test_build_select($option_ary, $option_default, $expected) { - global $user; - - $user->lang = new phpbb_mock_lang(); - $this->assertEquals($expected, build_select($option_ary, $option_default)); } } |