From 41956a8b9050fa6e1e301bfae51d947e6f13c068 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 24 Jul 2016 21:52:05 +0200 Subject: [ticket/14670] Set shared flag instead of defining prototype scope The prototype scope was deprecated in symfony 2.8 and removed in 3.0. PHPBB3-14670 --- tests/notification/fixtures/services_notification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/notification') diff --git a/tests/notification/fixtures/services_notification.yml b/tests/notification/fixtures/services_notification.yml index 6e68cccff6..c83d8bd323 100644 --- a/tests/notification/fixtures/services_notification.yml +++ b/tests/notification/fixtures/services_notification.yml @@ -70,7 +70,7 @@ services: test: class: phpbb\notification\type\test - scope: prototype + shared: false parent: notification.type.base tags: - { name: notification.type } -- cgit v1.2.1 From 42b7782927713c2ca2fb704db6217016347b586e Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 19 Mar 2017 21:46:20 +0700 Subject: [ticket/14972] Migrate from deprecated getMock() method to createMock() PHPBB3-14972 --- tests/notification/submit_post_base.php | 8 ++++---- tests/notification/submit_post_type_topic_test.php | 2 +- tests/notification/user_list_trim_test.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/notification') diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php index 21559c42a5..baa90f29b1 100644 --- a/tests/notification/submit_post_base.php +++ b/tests/notification/submit_post_base.php @@ -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); diff --git a/tests/notification/submit_post_type_topic_test.php b/tests/notification/submit_post_type_topic_test.php index f14f305517..a51f0780b1 100644 --- a/tests/notification/submit_post_type_topic_test.php +++ b/tests/notification/submit_post_type_topic_test.php @@ -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'); } /** diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php index 7d4dff6024..0de6294491 100644 --- a/tests/notification/user_list_trim_test.php +++ b/tests/notification/user_list_trim_test.php @@ -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('_'), -- cgit v1.2.1 From ebac54aa9e705e99a562d2fe2c0f57bc6af8dd32 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 30 Dec 2018 11:36:08 +0100 Subject: [ticket/14948] Adjust calls for twig and phpunit updates PHPBB3-14948 --- tests/notification/base.php | 2 +- tests/notification/convert_test.php | 2 +- tests/notification/submit_post_base.php | 2 +- tests/notification/submit_post_type_bookmark_test.php | 2 +- tests/notification/submit_post_type_post_in_queue_test.php | 2 +- tests/notification/submit_post_type_post_test.php | 2 +- tests/notification/submit_post_type_quote_test.php | 2 +- tests/notification/submit_post_type_topic_test.php | 2 +- tests/notification/user_list_trim_test.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/notification') diff --git a/tests/notification/base.php b/tests/notification/base.php index 80b9a0d777..f7faf50d68 100644 --- a/tests/notification/base.php +++ b/tests/notification/base.php @@ -50,7 +50,7 @@ abstract class phpbb_tests_notification_base extends phpbb_database_test_case ); } - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/notification/convert_test.php b/tests/notification/convert_test.php index 4a7fd89409..d4a33ff537 100644 --- a/tests/notification/convert_test.php +++ b/tests/notification/convert_test.php @@ -21,7 +21,7 @@ class phpbb_notification_convert_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/convert.xml'); } - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php index baa90f29b1..466d3ec07f 100644 --- a/tests/notification/submit_post_base.php +++ b/tests/notification/submit_post_base.php @@ -47,7 +47,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/submit_post_' . $this->item_type . '.xml'); } - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/notification/submit_post_type_bookmark_test.php b/tests/notification/submit_post_type_bookmark_test.php index 7c3b9f938f..9af247b3c3 100644 --- a/tests/notification/submit_post_type_bookmark_test.php +++ b/tests/notification/submit_post_type_bookmark_test.php @@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_bookmark_test extends phpbb_notificati { protected $item_type = 'notification.type.bookmark'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/notification/submit_post_type_post_in_queue_test.php b/tests/notification/submit_post_type_post_in_queue_test.php index 1390e92d96..bced0ea48c 100644 --- a/tests/notification/submit_post_type_post_in_queue_test.php +++ b/tests/notification/submit_post_type_post_in_queue_test.php @@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_post_in_queue_test extends phpbb_notif { protected $item_type = 'notification.type.post_in_queue'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/notification/submit_post_type_post_test.php b/tests/notification/submit_post_type_post_test.php index 037c326bc0..5580d0924e 100644 --- a/tests/notification/submit_post_type_post_test.php +++ b/tests/notification/submit_post_type_post_test.php @@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_post_test extends phpbb_notification_s { protected $item_type = 'notification.type.post'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/notification/submit_post_type_quote_test.php b/tests/notification/submit_post_type_quote_test.php index 3fab8c05ba..655f12661b 100644 --- a/tests/notification/submit_post_type_quote_test.php +++ b/tests/notification/submit_post_type_quote_test.php @@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_ { protected $item_type = 'notification.type.quote'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/notification/submit_post_type_topic_test.php b/tests/notification/submit_post_type_topic_test.php index a51f0780b1..070b2fa21e 100644 --- a/tests/notification/submit_post_type_topic_test.php +++ b/tests/notification/submit_post_type_topic_test.php @@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_topic_test extends phpbb_notification_ { protected $item_type = 'notification.type.topic'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php index 0de6294491..bf3058c342 100644 --- a/tests/notification/user_list_trim_test.php +++ b/tests/notification/user_list_trim_test.php @@ -20,7 +20,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_list_trim.xml'); } - public function setUp() + public function setUp(): void { global $phpbb_root_path, $phpEx, $phpbb_dispatcher, $user, $cache, $auth; -- cgit v1.2.1 From e1962acd4ee2ae756b48e5ca39b6423f3a93a359 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 28 Jul 2019 21:53:04 +0200 Subject: [ticket/15886] Use getMockBuilder instead of removed getMock() PHPBB3-15886 --- tests/notification/group_request_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/notification') diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php index e849c66fa5..b935b180d9 100644 --- a/tests/notification/group_request_test.php +++ b/tests/notification/group_request_test.php @@ -49,7 +49,7 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas $this->cache->get_driver() )); $this->container->set('group_helper', new \phpbb\group\helper( - $this->getMock('\phpbb\auth\auth'), + $this->getMockBuilder('\phpbb\auth\auth')->disableOriginalConstructor()->getMock(), $this->cache, $this->config, new \phpbb\language\language( @@ -61,7 +61,7 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas new phpbb_mock_request() ), new \phpbb\filesystem\filesystem(), - $this->getMock('\phpbb\request\request'), + $this->getMockBuilder('\phpbb\request\request')->disableOriginalConstructor()->getMock(), $phpbb_root_path, $phpEx ), -- cgit v1.2.1