diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-06-02 17:49:16 +0000 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-06-08 23:34:48 +0000 |
commit | 4e04f4e883896ae519930566859c6bf847792ceb (patch) | |
tree | 42e004eb9bee5d88b25ce94568fdd11e245cbb75 /tests | |
parent | e6e5e08d781e0a01dd59871afc7c943dd01003aa (diff) | |
download | nextcloud-server-4e04f4e883896ae519930566859c6bf847792ceb.tar.gz nextcloud-server-4e04f4e883896ae519930566859c6bf847792ceb.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) { |