diff options
author | Robin Appelman <robin@icewind.nl> | 2025-06-30 16:56:59 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2025-07-01 22:45:52 +0200 |
commit | aa15f9d16d5b46d04763c7deedb129990e819364 (patch) | |
tree | 758e0aebcac34a545f9a21806120a9fcb96f4cb6 /apps/encryption/tests/Crypto/EncryptionTest.php | |
parent | 1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff) | |
download | nextcloud-server-rector-phpunit10.tar.gz nextcloud-server-rector-phpunit10.zip |
chore: run rectorrector-phpunit10
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/encryption/tests/Crypto/EncryptionTest.php')
-rw-r--r-- | apps/encryption/tests/Crypto/EncryptionTest.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 999c6242f0c..37e484550ef 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -152,9 +152,7 @@ class EncryptionTest extends TestCase { return $publicKeys; } - /** - * @dataProvider dataProviderForTestGetPathToRealFile - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderForTestGetPathToRealFile')] public function testGetPathToRealFile($path, $expected): void { $this->assertSame($expected, self::invokePrivate($this->instance, 'getPathToRealFile', [$path]) @@ -170,9 +168,7 @@ class EncryptionTest extends TestCase { ]; } - /** - * @dataProvider dataTestBegin - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestBegin')] public function testBegin($mode, $header, $legacyCipher, $defaultCipher, $fileKey, $expected): void { $this->sessionMock->expects($this->once()) ->method('decryptAllModeActivated') @@ -265,11 +261,11 @@ class EncryptionTest extends TestCase { } /** - * @dataProvider dataTestUpdate * * @param string $fileKey * @param boolean $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestUpdate')] public function testUpdate($fileKey, $expected): void { $this->keyManagerMock->expects($this->once()) ->method('getFileKey')->willReturn($fileKey); @@ -354,9 +350,8 @@ class EncryptionTest extends TestCase { /** * by default the encryption module should encrypt regular files, files in * files_versions and files in files_trashbin - * - * @dataProvider dataTestShouldEncrypt */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestShouldEncrypt')] public function testShouldEncrypt($path, $shouldEncryptHomeStorage, $isHomeStorage, $expected): void { $this->utilMock->expects($this->once())->method('shouldEncryptHomeStorage') ->willReturn($shouldEncryptHomeStorage); |