diff options
Diffstat (limited to 'tests/lib/Authentication')
-rw-r--r-- | tests/lib/Authentication/Token/ManagerTest.php | 16 | ||||
-rw-r--r-- | tests/lib/Authentication/TwoFactorAuth/ManagerTest.php | 3 |
2 files changed, 5 insertions, 14 deletions
diff --git a/tests/lib/Authentication/Token/ManagerTest.php b/tests/lib/Authentication/Token/ManagerTest.php index 300517fab4a..58bbe236248 100644 --- a/tests/lib/Authentication/Token/ManagerTest.php +++ b/tests/lib/Authentication/Token/ManagerTest.php @@ -157,9 +157,7 @@ class ManagerTest extends TestCase { } } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testUpdateToken(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); @@ -172,9 +170,7 @@ class ManagerTest extends TestCase { $this->manager->updateToken($token); } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testUpdateTokenActivity(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); @@ -187,9 +183,7 @@ class ManagerTest extends TestCase { $this->manager->updateTokenActivity($token); } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testGetPassword(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); @@ -204,9 +198,7 @@ class ManagerTest extends TestCase { $this->assertSame('password', $result); } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testSetPassword(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index c68d1de60c5..a2bed8a3652 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -218,9 +218,8 @@ class ManagerTest extends TestCase { * enabled providers. * * If any of these providers is active, 2FA is enabled - * - * @dataProvider providerStatesFixData */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerStatesFixData')] public function testIsTwoFactorAuthenticatedFixesProviderStates(bool $providerEnabled, bool $expected): void { $this->providerRegistry->expects($this->once()) ->method('getProviderStates') |