diff options
Diffstat (limited to 'apps/comments')
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); |