aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Notification/ManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Notification/ManagerTest.php')
-rw-r--r--tests/lib/Notification/ManagerTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php
index 2a85316d7c4..cbd76989d24 100644
--- a/tests/lib/Notification/ManagerTest.php
+++ b/tests/lib/Notification/ManagerTest.php
@@ -153,7 +153,7 @@ class ManagerTest extends TestCase {
$this->coordinator,
$this->richTextFormatter,
])
- ->setMethods(['getApps'])
+ ->onlyMethods(['getApps'])
->getMock();
$manager->expects($this->once())
@@ -185,7 +185,7 @@ class ManagerTest extends TestCase {
$this->coordinator,
$this->richTextFormatter,
])
- ->setMethods(['getApps'])
+ ->onlyMethods(['getApps'])
->getMock();
$manager->expects($this->never())
@@ -210,7 +210,7 @@ class ManagerTest extends TestCase {
$this->coordinator,
$this->richTextFormatter,
])
- ->setMethods(['getApps'])
+ ->onlyMethods(['getApps'])
->getMock();
$manager->expects($this->once())
@@ -236,7 +236,7 @@ class ManagerTest extends TestCase {
$this->coordinator,
$this->richTextFormatter,
])
- ->setMethods(['getApps'])
+ ->onlyMethods(['getApps'])
->getMock();
$manager->expects($this->once())
@@ -246,7 +246,7 @@ class ManagerTest extends TestCase {
$manager->getCount($notification);
}
- public function dataIsFairUseOfFreePushService(): array {
+ public static function dataIsFairUseOfFreePushService(): array {
return [
[true, 999, true],
[true, 1000, true],
@@ -256,11 +256,11 @@ class ManagerTest extends TestCase {
}
/**
- * @dataProvider dataIsFairUseOfFreePushService
* @param bool $hasValidSubscription
* @param int $userCount
* @param bool $isFair
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataIsFairUseOfFreePushService')]
public function testIsFairUseOfFreePushService(bool $hasValidSubscription, int $userCount, bool $isFair): void {
$this->subscriptionRegistry->method('delegateHasValidSubscription')
->willReturn($hasValidSubscription);