diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 37e484550ef..5e09916b7a8 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -232,7 +232,7 @@ class EncryptionTest extends TestCase { ->willReturn(true); $this->keyManagerMock->expects($this->once()) ->method('getFileKey') - ->with($path, 'user', null, true) + ->with($path, null, null, true) ->willReturn($fileKey); $this->instance->begin($path, 'user', 'r', [], []); diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index 3fe76fc4f59..4c7a1fc6555 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -352,15 +352,8 @@ class KeyManagerTest extends TestCase { ]; } - /** - * - * @param $uid - * @param $isMasterKeyEnabled - * @param $privateKey - * @param $expected - */ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetFileKey')] - public function testGetFileKey($uid, $isMasterKeyEnabled, $privateKey, $encryptedFileKey, $expected): void { + public function testGetFileKey(?string $uid, bool $isMasterKeyEnabled, string|false $privateKey, string $encryptedFileKey, string $expected): void { $path = '/foo.txt'; if ($isMasterKeyEnabled) { @@ -374,6 +367,7 @@ class KeyManagerTest extends TestCase { } $this->invokePrivate($this->instance, 'masterKeyId', ['masterKeyId']); + $this->invokePrivate($this->instance, 'keyUid', [$uid]); $this->keyStorageMock->expects($this->exactly(2)) ->method('getFileKey') @@ -423,7 +417,7 @@ class KeyManagerTest extends TestCase { } $this->assertSame($expected, - $this->instance->getFileKey($path, $uid, null) + $this->instance->getFileKey($path, null, null) ); }