aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php')
-rw-r--r--tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
index 789f6269e18..0bc6cbb64cf 100644
--- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
+++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
@@ -46,7 +46,7 @@ class ChangeKeyStorageRootTest extends TestCase {
/** @var OutputInterface | \PHPUnit\Framework\MockObject\MockObject */
protected $outputInterface;
- /** @var \OCP\UserInterface | \PHPUnit\Framework\MockObject\MockObject */
+ /** @var UserInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $userInterface;
protected function setUp(): void {
@@ -78,9 +78,7 @@ class ChangeKeyStorageRootTest extends TestCase {
);
}
- /**
- * @dataProvider dataTestExecute
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestExecute')]
public function testExecute($newRoot, $answer, $successMoveKey): void {
$changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot')
->setConstructorArgs(
@@ -135,7 +133,7 @@ class ChangeKeyStorageRootTest extends TestCase {
}
public function testMoveAllKeys(): void {
- /** @var \OC\Core\Command\Encryption\ChangeKeyStorageRoot $changeKeyStorageRoot */
+ /** @var ChangeKeyStorageRoot $changeKeyStorageRoot */
$changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot')
->setConstructorArgs(
[
@@ -166,11 +164,11 @@ class ChangeKeyStorageRootTest extends TestCase {
}
/**
- * @dataProvider dataTestPrepareNewRootException
*
* @param bool $dirExists
* @param bool $couldCreateFile
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestPrepareNewRootException')]
public function testPrepareNewRootException($dirExists, $couldCreateFile): void {
$this->expectException(\Exception::class);
@@ -190,12 +188,12 @@ class ChangeKeyStorageRootTest extends TestCase {
}
/**
- * @dataProvider dataTestMoveSystemKeys
*
* @param bool $dirExists
* @param bool $targetExists
* @param bool $executeRename
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestMoveSystemKeys')]
public function testMoveSystemKeys($dirExists, $targetExists, $executeRename): void {
$changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot')
->setConstructorArgs(
@@ -256,13 +254,13 @@ class ChangeKeyStorageRootTest extends TestCase {
}
/**
- * @dataProvider dataTestMoveUserEncryptionFolder
*
* @param bool $userExists
* @param bool $isDir
* @param bool $targetExists
* @param bool $shouldRename
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestMoveUserEncryptionFolder')]
public function testMoveUserEncryptionFolder($userExists, $isDir, $targetExists, $shouldRename): void {
$changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot')
->setConstructorArgs(
@@ -308,9 +306,7 @@ class ChangeKeyStorageRootTest extends TestCase {
}
- /**
- * @dataProvider dataTestPrepareParentFolder
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestPrepareParentFolder')]
public function testPrepareParentFolder($path, $pathExists): void {
$this->view->expects($this->any())->method('file_exists')
->willReturnCallback(