aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Accounts/AccountPropertyTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Accounts/AccountPropertyTest.php')
-rw-r--r--tests/lib/Accounts/AccountPropertyTest.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/lib/Accounts/AccountPropertyTest.php b/tests/lib/Accounts/AccountPropertyTest.php
index 5df66eaa117..b92e45176a3 100644
--- a/tests/lib/Accounts/AccountPropertyTest.php
+++ b/tests/lib/Accounts/AccountPropertyTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -56,27 +57,20 @@ class AccountPropertyTest extends TestCase {
$this->assertEquals(IAccountManager::SCOPE_LOCAL, $actualReturn->getScope());
}
- public function scopesProvider() {
+ public static function scopesProvider(): array {
return [
// current values
[IAccountManager::SCOPE_PRIVATE, IAccountManager::SCOPE_PRIVATE],
[IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_LOCAL],
[IAccountManager::SCOPE_FEDERATED, IAccountManager::SCOPE_FEDERATED],
[IAccountManager::SCOPE_PUBLISHED, IAccountManager::SCOPE_PUBLISHED],
- // legacy values
- [IAccountManager::VISIBILITY_PRIVATE, IAccountManager::SCOPE_LOCAL],
- [IAccountManager::VISIBILITY_CONTACTS_ONLY, IAccountManager::SCOPE_FEDERATED],
- [IAccountManager::VISIBILITY_PUBLIC, IAccountManager::SCOPE_PUBLISHED],
- ['', IAccountManager::SCOPE_LOCAL],
// invalid values
['unknown', null],
['v2-unknown', null],
];
}
- /**
- * @dataProvider scopesProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('scopesProvider')]
public function testSetScopeMapping(string $storedScope, ?string $returnedScope): void {
if ($returnedScope === null) {
$this->expectException(\InvalidArgumentException::class);