diff options
Diffstat (limited to 'apps/settings/tests/Controller/AuthSettingsControllerTest.php')
-rw-r--r-- | apps/settings/tests/Controller/AuthSettingsControllerTest.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/settings/tests/Controller/AuthSettingsControllerTest.php b/apps/settings/tests/Controller/AuthSettingsControllerTest.php index 37321d02915..d195dbf83d3 100644 --- a/apps/settings/tests/Controller/AuthSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AuthSettingsControllerTest.php @@ -120,7 +120,7 @@ class AuthSettingsControllerTest extends TestCase { $this->session->expects($this->once()) ->method('getId') - ->will($this->throwException(new SessionNotAvailableException())); + ->willThrowException(new SessionNotAvailableException()); $expected = new JSONResponse(); $expected->setStatus(Http::STATUS_SERVICE_UNAVAILABLE); @@ -137,7 +137,7 @@ class AuthSettingsControllerTest extends TestCase { $this->tokenProvider->expects($this->once()) ->method('getToken') ->with('sessionid') - ->will($this->throwException(new InvalidTokenException())); + ->willThrowException(new InvalidTokenException()); $expected = new JSONResponse(); $expected->setStatus(Http::STATUS_SERVICE_UNAVAILABLE); @@ -213,9 +213,7 @@ class AuthSettingsControllerTest extends TestCase { ]; } - /** - * @dataProvider dataRenameToken - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataRenameToken')] public function testUpdateRename(string $name, string $newName): void { $tokenId = 42; $token = $this->createMock(PublicKeyToken::class); @@ -253,9 +251,7 @@ class AuthSettingsControllerTest extends TestCase { ]; } - /** - * @dataProvider dataUpdateFilesystemScope - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataUpdateFilesystemScope')] public function testUpdateFilesystemScope(bool $filesystem, bool $newFilesystem): void { $tokenId = 42; $token = $this->createMock(PublicKeyToken::class); |