aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/tests/Controller/AuthSettingsControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/tests/Controller/AuthSettingsControllerTest.php')
-rw-r--r--apps/settings/tests/Controller/AuthSettingsControllerTest.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/settings/tests/Controller/AuthSettingsControllerTest.php b/apps/settings/tests/Controller/AuthSettingsControllerTest.php
index bb6068ffe94..d195dbf83d3 100644
--- a/apps/settings/tests/Controller/AuthSettingsControllerTest.php
+++ b/apps/settings/tests/Controller/AuthSettingsControllerTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -119,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);
@@ -136,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);
@@ -212,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);
@@ -252,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);