From 887aa58905d5052f552cbf9a25dfa250b7513662 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Thu, 2 Jun 2022 17:49:16 +0000 Subject: [PATCH] Test all scopes Signed-off-by: Christopher Ng --- tests/lib/Avatar/AvatarManagerTest.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/lib/Avatar/AvatarManagerTest.php b/tests/lib/Avatar/AvatarManagerTest.php index 6dfc664abe1..ae9c0e1671f 100644 --- a/tests/lib/Avatar/AvatarManagerTest.php +++ b/tests/lib/Avatar/AvatarManagerTest.php @@ -192,22 +192,25 @@ class AvatarManagerTest extends \Test\TestCase { $this->assertEquals($expected, $this->avatarManager->getAvatar('vaLid-USER')); } - public function knownUnknownProvider() { + public function dataGetAvatarScopes() { return [ - [IAccountManager::SCOPE_LOCAL, false, false, false], - [IAccountManager::SCOPE_LOCAL, true, false, false], - // public access cannot see real avatar [IAccountManager::SCOPE_PRIVATE, true, false, true], // unknown users cannot see real avatar [IAccountManager::SCOPE_PRIVATE, false, false, true], // known users can see real avatar [IAccountManager::SCOPE_PRIVATE, false, true, false], + [IAccountManager::SCOPE_LOCAL, false, false, false], + [IAccountManager::SCOPE_LOCAL, true, false, false], + [IAccountManager::SCOPE_FEDERATED, false, false, false], + [IAccountManager::SCOPE_FEDERATED, true, false, false], + [IAccountManager::SCOPE_PUBLISHED, false, false, false], + [IAccountManager::SCOPE_PUBLISHED, true, false, false], ]; } /** - * @dataProvider knownUnknownProvider + * @dataProvider dataGetAvatarScopes */ public function testGetAvatarScopes($avatarScope, $isPublicCall, $isKnownUser, $expectedPlaceholder) { if ($isPublicCall) { -- 2.39.5