aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Encryption/Keys
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Encryption/Keys')
-rw-r--r--tests/lib/Encryption/Keys/StorageTest.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php
index bc79c5771ca..333d8d8ce21 100644
--- a/tests/lib/Encryption/Keys/StorageTest.php
+++ b/tests/lib/Encryption/Keys/StorageTest.php
@@ -124,13 +124,13 @@ class StorageTest extends TestCase {
}
/**
- * @dataProvider dataTestGetFileKey
*
* @param string $path
* @param string $strippedPartialName
* @param bool $originalKeyExists
* @param string $expectedKeyContent
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetFileKey')]
public function testGetFileKey($path, $strippedPartialName, $originalKeyExists, $expectedKeyContent): void {
$this->config->method('getSystemValueString')
->with('version')
@@ -408,9 +408,7 @@ class StorageTest extends TestCase {
);
}
- /**
- * @dataProvider dataProviderCopyRename
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderCopyRename')]
public function testRenameKeys($source, $target, $systemWideMountSource, $systemWideMountTarget, $expectedSource, $expectedTarget): void {
$this->view->expects($this->any())
->method('file_exists')
@@ -439,9 +437,7 @@ class StorageTest extends TestCase {
$this->storage->renameKeys($source, $target);
}
- /**
- * @dataProvider dataProviderCopyRename
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderCopyRename')]
public function testCopyKeys($source, $target, $systemWideMountSource, $systemWideMountTarget, $expectedSource, $expectedTarget): void {
$this->view->expects($this->any())
->method('file_exists')
@@ -510,13 +506,13 @@ class StorageTest extends TestCase {
}
/**
- * @dataProvider dataTestGetPathToKeys
*
* @param string $path
* @param boolean $systemWideMountPoint
* @param string $storageRoot
* @param string $expected
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetPathToKeys')]
public function testGetPathToKeys($path, $systemWideMountPoint, $storageRoot, $expected): void {
$this->invokePrivate($this->storage, 'root_dir', [$storageRoot]);
@@ -569,9 +565,9 @@ class StorageTest extends TestCase {
/**
- * @dataProvider dataTestBackupUserKeys
* @param bool $createBackupDir
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestBackupUserKeys')]
public function testBackupUserKeys($createBackupDir): void {
$storage = $this->getMockBuilder('OC\Encryption\Keys\Storage')
->setConstructorArgs([$this->view, $this->util, $this->crypto, $this->config])
@@ -589,7 +585,7 @@ class StorageTest extends TestCase {
'user1/files_encryption/backup/test.encryptionModule.1234567',
];
$this->view->expects($this->exactly(2))->method('mkdir')
- ->willReturnCallback(function ($path) use (&$calls) {
+ ->willReturnCallback(function ($path) use (&$calls): void {
$expected = array_shift($calls);
$this->assertEquals($expected, $path);
});