aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Avatar
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-06-30 16:56:59 +0200
committerRobin Appelman <robin@icewind.nl>2025-07-01 22:45:52 +0200
commitaa15f9d16d5b46d04763c7deedb129990e819364 (patch)
tree758e0aebcac34a545f9a21806120a9fcb96f4cb6 /tests/lib/Avatar
parent1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff)
downloadnextcloud-server-rector-phpunit10.tar.gz
nextcloud-server-rector-phpunit10.zip
chore: run rectorrector-phpunit10
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Avatar')
-rw-r--r--tests/lib/Avatar/AvatarManagerTest.php4
-rw-r--r--tests/lib/Avatar/UserAvatarTest.php10
2 files changed, 5 insertions, 9 deletions
diff --git a/tests/lib/Avatar/AvatarManagerTest.php b/tests/lib/Avatar/AvatarManagerTest.php
index 3ce9fc41800..23d3b9d1c2a 100644
--- a/tests/lib/Avatar/AvatarManagerTest.php
+++ b/tests/lib/Avatar/AvatarManagerTest.php
@@ -204,9 +204,7 @@ class AvatarManagerTest extends \Test\TestCase {
];
}
- /**
- * @dataProvider dataGetAvatarScopes
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataGetAvatarScopes')]
public function testGetAvatarScopes($avatarScope, $isPublicCall, $isKnownUser, $expectedPlaceholder): void {
if ($isPublicCall) {
$requestingUser = null;
diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php
index 081284158eb..03a868c7854 100644
--- a/tests/lib/Avatar/UserAvatarTest.php
+++ b/tests/lib/Avatar/UserAvatarTest.php
@@ -27,10 +27,10 @@ class UserAvatarTest extends \Test\TestCase {
/** @var \OC\Avatar\UserAvatar */
private $avatar;
- /** @var \OC\User\User | \PHPUnit\Framework\MockObject\MockObject $user */
+ /** @var User|\PHPUnit\Framework\MockObject\MockObject $user */
private $user;
- /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
protected function setUp(): void {
@@ -247,9 +247,7 @@ class UserAvatarTest extends \Test\TestCase {
}
- /**
- * @dataProvider avatarTextData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('avatarTextData')]
public function testGetAvatarText($displayName, $expectedAvatarText): void {
$user = $this->getUserWithDisplayName($displayName);
$avatar = $this->getUserAvatar($user);
@@ -287,7 +285,7 @@ class UserAvatarTest extends \Test\TestCase {
}
private function getUserAvatar($user) {
- /** @var \OCP\IL10N | \PHPUnit\Framework\MockObject\MockObject $l */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l */
$l = $this->createMock(IL10N::class);
$l->method('t')->willReturnArgument(0);