1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

[ticket/14972] Migrate from deprecated getMock() method to createMock()

PHPBB3-14972
This commit is contained in:
rxu
2017-03-19 21:46:20 +07:00
parent 055a5f8040
commit e3859d894d
70 changed files with 168 additions and 141 deletions

View File

@@ -58,7 +58,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
$db = $this->db;
// Auth
$auth = $this->getMock('\phpbb\auth\auth');
$auth = $this->createMock('\phpbb\auth\auth');
$auth->expects($this->any())
->method('acl_get')
->with($this->stringContains('_'),
@@ -92,7 +92,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
$lang = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
// User
$user = $this->getMock('\phpbb\user', array(), array(
$user = $this->createMock('\phpbb\user', array(), array(
$lang,
'\phpbb\datetime'
));
@@ -105,8 +105,8 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
);
// Request
$type_cast_helper = $this->getMock('\phpbb\request\type_cast_helper_interface');
$request = $this->getMock('\phpbb\request\request');
$type_cast_helper = $this->createMock('\phpbb\request\type_cast_helper_interface');
$request = $this->createMock('\phpbb\request\request');
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
$user_loader = new \phpbb\user_loader($db, $phpbb_root_path, $phpEx, USERS_TABLE);

View File

@@ -42,7 +42,7 @@ class phpbb_notification_submit_post_type_topic_test extends phpbb_notification_
),
)));
$phpbb_log = $this->getMock('\phpbb\log\dummy');
$phpbb_log = $this->createMock('\phpbb\log\dummy');
}
/**

View File

@@ -39,7 +39,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
$phpEx
);
$auth = $this->getMock('\phpbb\auth\auth');
$auth = $this->createMock('\phpbb\auth\auth');
$auth->expects($this->any())
->method('acl_get')
->with($this->stringContains('_'),