diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-06-02 17:49:16 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-06-07 23:57:21 +0000 |
commit | 7c50dd888edb4d4a3ab4f132c628070fd3b8b8ac (patch) | |
tree | 1099c50570da00d5cba5f01b8d2850a4d3336b9e /tests | |
parent | 7455cd9dd7fcbb4f093cc159613de6aad411766b (diff) | |
download | nextcloud-server-7c50dd888edb4d4a3ab4f132c628070fd3b8b8ac.tar.gz nextcloud-server-7c50dd888edb4d4a3ab4f132c628070fd3b8b8ac.zip |
Test all scopes
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Avatar/AvatarManagerTest.php | 13 |
1 files 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) { |