aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-10-18 12:04:22 +0200
committerprovokateurin <kate@provokateurin.de>2024-10-21 12:37:59 +0200
commit381077028adf388a7081cf42026570c6be47b198 (patch)
treec0f8e9b6caea80d6b55d6fdcc9188ba57197fa0f /apps/encryption/tests
parent4d8d11d2f79da348644e0902e78a2f000498cd52 (diff)
downloadnextcloud-server-381077028adf388a7081cf42026570c6be47b198.tar.gz
nextcloud-server-381077028adf388a7081cf42026570c6be47b198.zip
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/encryption/tests')
-rw-r--r--apps/encryption/tests/Command/TestEnableMasterKey.php2
-rw-r--r--apps/encryption/tests/Controller/RecoveryControllerTest.php6
-rw-r--r--apps/encryption/tests/Controller/SettingsControllerTest.php10
-rw-r--r--apps/encryption/tests/Controller/StatusControllerTest.php4
-rw-r--r--apps/encryption/tests/Crypto/CryptTest.php6
-rw-r--r--apps/encryption/tests/Crypto/EncryptAllTest.php14
-rw-r--r--apps/encryption/tests/Crypto/EncryptionTest.php2
-rw-r--r--apps/encryption/tests/KeyManagerTest.php12
-rw-r--r--apps/encryption/tests/RecoveryTest.php8
-rw-r--r--apps/encryption/tests/SessionTest.php2
-rw-r--r--apps/encryption/tests/UtilTest.php8
11 files changed, 37 insertions, 37 deletions
diff --git a/apps/encryption/tests/Command/TestEnableMasterKey.php b/apps/encryption/tests/Command/TestEnableMasterKey.php
index 2ed29becf2a..c4678b778bc 100644
--- a/apps/encryption/tests/Command/TestEnableMasterKey.php
+++ b/apps/encryption/tests/Command/TestEnableMasterKey.php
@@ -23,7 +23,7 @@ class TestEnableMasterKey extends TestCase {
/** @var Util | \PHPUnit\Framework\MockObject\MockObject */
protected $util;
- /** @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
/** @var \Symfony\Component\Console\Helper\QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */
diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php
index 57015975cfc..9de583b387c 100644
--- a/apps/encryption/tests/Controller/RecoveryControllerTest.php
+++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php
@@ -18,11 +18,11 @@ use Test\TestCase;
class RecoveryControllerTest extends TestCase {
/** @var RecoveryController */
private $controller;
- /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $requestMock;
- /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $configMock;
- /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
/** @var Recovery|\PHPUnit\Framework\MockObject\MockObject */
private $recoveryMock;
diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php
index 830536dc835..b676d57164f 100644
--- a/apps/encryption/tests/Controller/SettingsControllerTest.php
+++ b/apps/encryption/tests/Controller/SettingsControllerTest.php
@@ -27,16 +27,16 @@ class SettingsControllerTest extends TestCase {
/** @var SettingsController */
private $controller;
- /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $requestMock;
- /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
- /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManagerMock;
- /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSessionMock;
/** @var KeyManager|\PHPUnit\Framework\MockObject\MockObject */
@@ -50,7 +50,7 @@ class SettingsControllerTest extends TestCase {
/** @var MockObject|IUser */
private $user;
- /** @var \OCP\ISession|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $ocSessionMock;
/** @var Util|\PHPUnit\Framework\MockObject\MockObject */
diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php
index e52aaba30c1..fbe44f52fb7 100644
--- a/apps/encryption/tests/Controller/StatusControllerTest.php
+++ b/apps/encryption/tests/Controller/StatusControllerTest.php
@@ -16,10 +16,10 @@ use Test\TestCase;
class StatusControllerTest extends TestCase {
- /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $requestMock;
- /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
/** @var Session|\PHPUnit\Framework\MockObject\MockObject */
diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php
index ba0227ec56a..74afc6d44a1 100644
--- a/apps/encryption/tests/Crypto/CryptTest.php
+++ b/apps/encryption/tests/Crypto/CryptTest.php
@@ -19,13 +19,13 @@ class CryptTest extends TestCase {
/** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
/** @var Crypt */
diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php
index 9de4f6c2c67..d702c123b9b 100644
--- a/apps/encryption/tests/Crypto/EncryptAllTest.php
+++ b/apps/encryption/tests/Crypto/EncryptAllTest.php
@@ -35,22 +35,22 @@ class EncryptAllTest extends TestCase {
/** @var \PHPUnit\Framework\MockObject\MockObject|Util */
protected $util;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IUserManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IUserManager */
protected $userManager;
/** @var \PHPUnit\Framework\MockObject\MockObject|Setup */
protected $setupUser;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Files\View */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|View */
protected $view;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */
protected $config;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Mail\IMailer */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IMailer */
protected $mailer;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IL10N */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IL10N */
protected $l;
/** @var \PHPUnit\Framework\MockObject\MockObject | IFactory */
@@ -65,10 +65,10 @@ class EncryptAllTest extends TestCase {
/** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */
protected $outputInterface;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\UserInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|UserInterface */
protected $userInterface;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Security\ISecureRandom */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ISecureRandom */
protected $secureRandom;
/** @var EncryptAll */
diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php
index 2390012a97a..7f3d9d1f348 100644
--- a/apps/encryption/tests/Crypto/EncryptionTest.php
+++ b/apps/encryption/tests/Crypto/EncryptionTest.php
@@ -50,7 +50,7 @@ class EncryptionTest extends TestCase {
/** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */
private $loggerMock;
- /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
private IStorage&MockObject $storageMock;
diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php
index 54c1bc2295a..8f5c9a78faf 100644
--- a/apps/encryption/tests/KeyManagerTest.php
+++ b/apps/encryption/tests/KeyManagerTest.php
@@ -46,7 +46,7 @@ class KeyManagerTest extends TestCase {
/** @var Crypt|\PHPUnit\Framework\MockObject\MockObject */
private $cryptMock;
- /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userMock;
/** @var Session|\PHPUnit\Framework\MockObject\MockObject */
@@ -58,7 +58,7 @@ class KeyManagerTest extends TestCase {
/** @var Util|\PHPUnit\Framework\MockObject\MockObject */
private $utilMock;
- /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $configMock;
/** @var ILockingProvider|MockObject */
@@ -661,7 +661,7 @@ class KeyManagerTest extends TestCase {
->with('/admin/files/myfile.txt')
->willReturn(false);
- /** @var \OC\Files\View $view */
+ /** @var View $view */
$this->assertSame(0, $this->instance->getVersion('/admin/files/myfile.txt', $view));
}
@@ -678,7 +678,7 @@ class KeyManagerTest extends TestCase {
->with('/admin/files/myfile.txt')
->willReturn($fileInfo);
- /** @var \OC\Files\View $view */
+ /** @var View $view */
$this->assertSame(1337, $this->instance->getVersion('/admin/files/myfile.txt', $view));
}
@@ -708,7 +708,7 @@ class KeyManagerTest extends TestCase {
->with('/admin/files/myfile.txt')
->willReturn($fileInfo);
- /** @var \OC\Files\View $view */
+ /** @var View $view */
$this->instance->setVersion('/admin/files/myfile.txt', 5, $view);
}
@@ -720,7 +720,7 @@ class KeyManagerTest extends TestCase {
->with('/admin/files/myfile.txt')
->willReturn(false);
- /** @var \OC\Files\View $view */
+ /** @var View $view */
$this->instance->setVersion('/admin/files/myfile.txt', 5, $view);
}
diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php
index 725e16342e7..17ad385eca0 100644
--- a/apps/encryption/tests/RecoveryTest.php
+++ b/apps/encryption/tests/RecoveryTest.php
@@ -21,15 +21,15 @@ use Test\TestCase;
class RecoveryTest extends TestCase {
private static $tempStorage = [];
/**
- * @var \OCP\Encryption\IFile|\PHPUnit\Framework\MockObject\MockObject
+ * @var IFile|\PHPUnit\Framework\MockObject\MockObject
*/
private $fileMock;
/**
- * @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject
+ * @var View|\PHPUnit\Framework\MockObject\MockObject
*/
private $viewMock;
/**
- * @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject
+ * @var IUserSession|\PHPUnit\Framework\MockObject\MockObject
*/
private $userSessionMock;
/**
@@ -41,7 +41,7 @@ class RecoveryTest extends TestCase {
*/
private $keyManagerMock;
/**
- * @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject
+ * @var IConfig|\PHPUnit\Framework\MockObject\MockObject
*/
private $configMock;
/**
diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php
index c9486658bcb..3072bc6ef3b 100644
--- a/apps/encryption/tests/SessionTest.php
+++ b/apps/encryption/tests/SessionTest.php
@@ -18,7 +18,7 @@ class SessionTest extends TestCase {
* @var Session
*/
private $instance;
- /** @var \OCP\ISession|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $sessionMock;
diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php
index 5571a9483db..711564af5bd 100644
--- a/apps/encryption/tests/UtilTest.php
+++ b/apps/encryption/tests/UtilTest.php
@@ -22,16 +22,16 @@ use Test\TestCase;
class UtilTest extends TestCase {
private static $tempStorage = [];
- /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $configMock;
- /** @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var View|\PHPUnit\Framework\MockObject\MockObject */
private $filesMock;
- /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManagerMock;
- /** @var \OCP\Files\Mount\IMountPoint|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IMountPoint|\PHPUnit\Framework\MockObject\MockObject */
private $mountMock;
/** @var Util */