diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-12-04 13:29:40 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-12-04 13:29:40 +0100 |
commit | c659fe4cbe1e80b7d1ed7c46815ce2573412fd6b (patch) | |
tree | ad6a1e3326638879577aab4c30f4c19ebb674dfd /tests/functions_acp | |
parent | 8b2d515736ffc9e9497e35f0db2e8357f91805d5 (diff) | |
download | forums-c659fe4cbe1e80b7d1ed7c46815ce2573412fd6b.tar forums-c659fe4cbe1e80b7d1ed7c46815ce2573412fd6b.tar.gz forums-c659fe4cbe1e80b7d1ed7c46815ce2573412fd6b.tar.bz2 forums-c659fe4cbe1e80b7d1ed7c46815ce2573412fd6b.tar.xz forums-c659fe4cbe1e80b7d1ed7c46815ce2573412fd6b.zip |
[ticket/12056] h_radio test: Fix "Creating default object from empty value"
PHPBB3-12056
Diffstat (limited to 'tests/functions_acp')
-rw-r--r-- | tests/functions_acp/h_radio_test.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/functions_acp/h_radio_test.php b/tests/functions_acp/h_radio_test.php index a61f2e8975..4c1872d341 100644 --- a/tests/functions_acp/h_radio_test.php +++ b/tests/functions_acp/h_radio_test.php @@ -11,6 +11,16 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_h_radio_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 h_radio_data() { return array( @@ -111,10 +121,6 @@ class phpbb_functions_acp_h_radio_test extends phpbb_test_case */ public function test_h_radio($name, $input_ary, $input_default, $id, $key, $expected) { - global $user; - - $user->lang = new phpbb_mock_lang(); - $this->assertEquals($expected, h_radio($name, $input_ary, $input_default, $id, $key)); } } |