1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 10:44:20 +02:00

[ticket/16549] Fix tests

PHPBB3-16549
This commit is contained in:
rxu
2020-08-10 15:02:25 +07:00
parent 342301a1fc
commit 3df19411b4
43 changed files with 351 additions and 54 deletions

View File

@@ -721,7 +721,14 @@ class phpbb_functional_test_case extends phpbb_test_case
$db = $this->get_db();
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
$user = $this->createMock('\phpbb\user');
$user = $this->createMock('\phpbb\user', array(), array(
new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
'\phpbb\datetime'
));
$user->data['user_id'] = 2; // admin
$user->ip = '';
$auth = $this->createMock('\phpbb\auth\auth');
$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
@@ -755,7 +762,14 @@ class phpbb_functional_test_case extends phpbb_test_case
$db = $this->get_db();
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
$user = $this->createMock('\phpbb\user');
$user = $this->createMock('\phpbb\user', array(), array(
new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
'\phpbb\datetime'
));
$user->data['user_id'] = 2; // admin
$user->ip = '';
$auth = $this->createMock('\phpbb\auth\auth');
$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);