[ticket/331] Specify datetime class in tests
This commit is contained in:
@@ -22,7 +22,7 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
|
||||
|
||||
global $auth, $cache, $config, $phpbb_container, $phpbb_dispatcher, $template, $user;
|
||||
|
||||
$user = new \phpbb\user();
|
||||
$user = new \phpbb\user('\phpbb\datetime');
|
||||
$user->data['user_id'] = 2;
|
||||
$user->timezone = new \DateTimeZone('UTC');
|
||||
$user->add_lang('common');
|
||||
|
||||
@@ -24,7 +24,7 @@ class phpbb_unit_functions_functions_test extends \board3\portal\tests\testframe
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$user = $this->getMock('\phpbb\user', array('optionget'));
|
||||
$user = $this->getMock('\phpbb\user', array('optionget'), array('\phpbb\datetime'));
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'sql_exists'));
|
||||
$cache->expects($this->any())
|
||||
->method('obtain_word_list')
|
||||
|
||||
@@ -22,7 +22,7 @@ class phpbb_unit_functions_get_user_groups_test extends \board3\portal\tests\tes
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$user = $this->getMock('\phpbb\user', array('optionget'));
|
||||
$user = $this->getMock('\phpbb\user', array('optionget'), array('\phpbb\datetime'));
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('get', 'put', 'sql_exists'));
|
||||
$cache->expects($this->any())
|
||||
->method('get')
|
||||
|
||||
Reference in New Issue
Block a user