aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-07-02 18:30:40 +0200
committerGitHub <noreply@github.com>2025-07-02 18:30:40 +0200
commit2337bd84c2f420b1944c3c1f4739ac0cfea15ca4 (patch)
treef5f0a89bb926f42fbb3834b3191d4267feb14dfa /apps/comments
parent5d14f873752ce15d37f6fa987a3d0c51702f88df (diff)
parentaa15f9d16d5b46d04763c7deedb129990e819364 (diff)
downloadnextcloud-server-master.tar.gz
nextcloud-server-master.zip
Merge pull request #53728 from nextcloud/rector-phpunit10HEADmaster
chore/rector: make phpunit dataproviders phpunit 12 compatible
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php2
-rw-r--r--apps/comments/tests/Unit/Controller/NotificationsTest.php2
-rw-r--r--apps/comments/tests/Unit/EventHandlerTest.php4
-rw-r--r--apps/comments/tests/Unit/Notification/ListenerTest.php6
4 files changed, 5 insertions, 9 deletions
diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
index 79a2700e3d3..4d3392a562d 100644
--- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
+++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
@@ -25,9 +25,9 @@ class CommentersSorterTest extends TestCase {
}
/**
- * @dataProvider sortDataProvider
* @param $data
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('sortDataProvider')]
public function testSort($data): void {
$commentMocks = [];
foreach ($data['actors'] as $actorType => $actors) {
diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php
index 59d0b9ccb00..04490ca63e8 100644
--- a/apps/comments/tests/Unit/Controller/NotificationsTest.php
+++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php
@@ -138,7 +138,7 @@ class NotificationsTest extends TestCase {
$this->commentsManager->expects($this->any())
->method('get')
->with('42')
- ->will($this->throwException(new NotFoundException()));
+ ->willThrowException(new NotFoundException());
$this->rootFolder->expects($this->never())
->method('getUserFolder');
diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php
index df2876e20a3..9d26f828d70 100644
--- a/apps/comments/tests/Unit/EventHandlerTest.php
+++ b/apps/comments/tests/Unit/EventHandlerTest.php
@@ -57,9 +57,7 @@ class EventHandlerTest extends TestCase {
];
}
- /**
- * @dataProvider handledProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('handledProvider')]
public function testHandled(string $eventType): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php
index ae5a3c40bc6..356a26f23cd 100644
--- a/apps/comments/tests/Unit/Notification/ListenerTest.php
+++ b/apps/comments/tests/Unit/Notification/ListenerTest.php
@@ -45,10 +45,10 @@ class ListenerTest extends TestCase {
}
/**
- * @dataProvider eventProvider
* @param string $eventType
* @param string $notificationMethod
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('eventProvider')]
public function testEvaluate($eventType, $notificationMethod): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
@@ -110,9 +110,7 @@ class ListenerTest extends TestCase {
$this->listener->evaluate($event);
}
- /**
- * @dataProvider eventProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('eventProvider')]
public function testEvaluateNoMentions(string $eventType): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);