aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication/Token/ManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Authentication/Token/ManagerTest.php')
-rw-r--r--tests/lib/Authentication/Token/ManagerTest.php18
1 files changed, 5 insertions, 13 deletions
diff --git a/tests/lib/Authentication/Token/ManagerTest.php b/tests/lib/Authentication/Token/ManagerTest.php
index 0f95d1d2f2c..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);
@@ -382,7 +374,7 @@ class ManagerTest extends TestCase {
$this->publicKeyTokenProvider
->expects($this->exactly(2))
->method('invalidateTokenById')
- ->willReturnCallback(function () use (&$calls) {
+ ->willReturnCallback(function () use (&$calls): void {
$expected = array_shift($calls);
$this->assertEquals($expected, func_get_args());
});