diff options
author | Robin Appelman <robin@icewind.nl> | 2025-07-02 18:30:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-02 18:30:40 +0200 |
commit | 2337bd84c2f420b1944c3c1f4739ac0cfea15ca4 (patch) | |
tree | f5f0a89bb926f42fbb3834b3191d4267feb14dfa /apps/settings/tests/Controller/AuthSettingsControllerTest.php | |
parent | 5d14f873752ce15d37f6fa987a3d0c51702f88df (diff) | |
parent | aa15f9d16d5b46d04763c7deedb129990e819364 (diff) | |
download | nextcloud-server-master.tar.gz nextcloud-server-master.zip |
chore/rector: make phpunit dataproviders phpunit 12 compatible
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); |