aboutsummaryrefslogtreecommitdiffstats
path: root/tests/profilefields/type_dropdown_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/profilefields/type_dropdown_test.php')
-rw-r--r--tests/profilefields/type_dropdown_test.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/profilefields/type_dropdown_test.php b/tests/profilefields/type_dropdown_test.php
index ab02353fb9..738801d524 100644
--- a/tests/profilefields/type_dropdown_test.php
+++ b/tests/profilefields/type_dropdown_test.php
@@ -23,22 +23,24 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
* @access public
* @return null
*/
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx;
- $user = $this->getMock('\phpbb\user', array(), array(
- new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
- '\phpbb\datetime'
- ));
+ $db = $this->createMock('phpbb\\db\\driver\\driver');
+
+ $user = $this->createMock('\phpbb\user');
$user->expects($this->any())
->method('lang')
->will($this->returnCallback(array($this, 'return_callback_implode')));
- $request = $this->getMock('\phpbb\request\request');
- $template = $this->getMock('\phpbb\template\template');
+ $request = $this->createMock('\phpbb\request\request');
+ $template = $this->createMock('\phpbb\template\template');
- $lang = $this->getMock('\phpbb\profilefields\lang_helper', array(), array(null, null));
+ $lang = $this->getMockBuilder('\phpbb\profilefields\lang_helper')
+ ->setMethods(array('get_options_lang', 'is_set', 'get'))
+ ->setConstructorArgs(array($db, LANG_TABLE))
+ ->getMock();
$lang->expects($this->any())
->method('get_options_lang');