aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification
diff options
context:
space:
mode:
Diffstat (limited to 'tests/notification')
-rw-r--r--tests/notification/base.php2
-rw-r--r--tests/notification/convert_test.php2
-rw-r--r--tests/notification/fixtures/services_notification.yml2
-rw-r--r--tests/notification/group_request_test.php4
-rw-r--r--tests/notification/submit_post_base.php10
-rw-r--r--tests/notification/submit_post_type_bookmark_test.php2
-rw-r--r--tests/notification/submit_post_type_post_in_queue_test.php2
-rw-r--r--tests/notification/submit_post_type_post_test.php2
-rw-r--r--tests/notification/submit_post_type_quote_test.php2
-rw-r--r--tests/notification/submit_post_type_topic_test.php4
-rw-r--r--tests/notification/user_list_trim_test.php4
11 files changed, 18 insertions, 18 deletions
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/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 }
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
),
diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php
index 21559c42a5..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();
@@ -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_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 f14f305517..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();
@@ -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..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;
@@ -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('_'),