diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-11 21:32:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-12 13:55:19 +0200 |
commit | 234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch) | |
tree | 880cec2bf4fe4846eff9fa5aa68d2671fb0495be /apps/encryption/tests | |
parent | 138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff) | |
download | nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.tar.gz nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.zip |
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/encryption/tests')
-rw-r--r-- | apps/encryption/tests/Command/TestEnableMasterKey.php | 10 | ||||
-rw-r--r-- | apps/encryption/tests/Controller/RecoveryControllerTest.php | 8 | ||||
-rw-r--r-- | apps/encryption/tests/Controller/SettingsControllerTest.php | 18 | ||||
-rw-r--r-- | apps/encryption/tests/Controller/StatusControllerTest.php | 8 | ||||
-rw-r--r-- | apps/encryption/tests/Crypto/CryptTest.php | 10 | ||||
-rw-r--r-- | apps/encryption/tests/Crypto/DecryptAllTest.php | 10 | ||||
-rw-r--r-- | apps/encryption/tests/Crypto/EncryptAllTest.php | 36 | ||||
-rw-r--r-- | apps/encryption/tests/Crypto/EncryptionTest.php | 20 | ||||
-rw-r--r-- | apps/encryption/tests/Hooks/UserHooksTest.php | 20 | ||||
-rw-r--r-- | apps/encryption/tests/KeyManagerTest.php | 24 | ||||
-rw-r--r-- | apps/encryption/tests/RecoveryTest.php | 12 | ||||
-rw-r--r-- | apps/encryption/tests/SessionTest.php | 12 | ||||
-rw-r--r-- | apps/encryption/tests/Users/SetupTest.php | 4 | ||||
-rw-r--r-- | apps/encryption/tests/UtilTest.php | 8 |
14 files changed, 100 insertions, 100 deletions
diff --git a/apps/encryption/tests/Command/TestEnableMasterKey.php b/apps/encryption/tests/Command/TestEnableMasterKey.php index b8db72938a5..ebaf477ddc5 100644 --- a/apps/encryption/tests/Command/TestEnableMasterKey.php +++ b/apps/encryption/tests/Command/TestEnableMasterKey.php @@ -38,19 +38,19 @@ class TestEnableMasterKey extends TestCase { /** @var EnableMasterKey */ protected $enableMasterKey; - /** @var Util | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Util | \PHPUnit\Framework\MockObject\MockObject */ protected $util; - /** @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \Symfony\Component\Console\Helper\QuestionHelper | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \Symfony\Component\Console\Helper\QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */ protected $questionHelper; - /** @var \Symfony\Component\Console\Output\OutputInterface | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \Symfony\Component\Console\Output\OutputInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $output; - /** @var \Symfony\Component\Console\Input\InputInterface | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \Symfony\Component\Console\Input\InputInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $input; protected function setUp(): void { diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php index 27d67a12dfa..d92cfebf295 100644 --- a/apps/encryption/tests/Controller/RecoveryControllerTest.php +++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php @@ -37,13 +37,13 @@ use Test\TestCase; class RecoveryControllerTest extends TestCase { /** @var RecoveryController */ private $controller; - /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $requestMock; - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $configMock; - /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10nMock; - /** @var \OCA\Encryption\Recovery|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Recovery|\PHPUnit\Framework\MockObject\MockObject */ private $recoveryMock; public function adminRecoveryProvider() { diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php index f0935f1b788..0c50491857b 100644 --- a/apps/encryption/tests/Controller/SettingsControllerTest.php +++ b/apps/encryption/tests/Controller/SettingsControllerTest.php @@ -46,33 +46,33 @@ class SettingsControllerTest extends TestCase { /** @var SettingsController */ private $controller; - /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $requestMock; - /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10nMock; - /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManagerMock; - /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSessionMock; - /** @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; - /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; - /** @var \OCA\Encryption\Session|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; /** @var MockObject|IUser */ private $user; - /** @var \OCP\ISession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\ISession|\PHPUnit\Framework\MockObject\MockObject */ private $ocSessionMock; - /** @var \OCA\Encryption\Util|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */ private $utilMock; protected function setUp(): void { diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php index 5028fefbbe0..4c1c59bccf7 100644 --- a/apps/encryption/tests/Controller/StatusControllerTest.php +++ b/apps/encryption/tests/Controller/StatusControllerTest.php @@ -36,16 +36,16 @@ use Test\TestCase; class StatusControllerTest extends TestCase { - /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $requestMock; - /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10nMock; - /** @var \OCA\Encryption\Session | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Session | \PHPUnit\Framework\MockObject\MockObject */ protected $sessionMock; - /** @var IManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */ protected $encryptionManagerMock; /** @var StatusController */ diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php index 6f7b0cc2765..4af41a9aac0 100644 --- a/apps/encryption/tests/Crypto/CryptTest.php +++ b/apps/encryption/tests/Crypto/CryptTest.php @@ -37,16 +37,16 @@ use Test\TestCase; class CryptTest extends TestCase { - /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l; /** @var Crypt */ @@ -385,7 +385,7 @@ class CryptTest extends TestCase { * @dataProvider dataTestDecryptPrivateKey */ public function testDecryptPrivateKey($header, $privateKey, $expectedCipher, $isValidKey, $expected) { - /** @var \OCA\Encryption\Crypto\Crypt | \PHPUnit_Framework_MockObject_MockObject $crypt */ + /** @var \OCA\Encryption\Crypto\Crypt | \PHPUnit\Framework\MockObject\MockObject $crypt */ $crypt = $this->getMockBuilder(Crypt::class) ->setConstructorArgs( [ diff --git a/apps/encryption/tests/Crypto/DecryptAllTest.php b/apps/encryption/tests/Crypto/DecryptAllTest.php index b4d846bfd5a..2721a6e8b53 100644 --- a/apps/encryption/tests/Crypto/DecryptAllTest.php +++ b/apps/encryption/tests/Crypto/DecryptAllTest.php @@ -38,19 +38,19 @@ class DecryptAllTest extends TestCase { /** @var DecryptAll */ protected $instance; - /** @var Util | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Util | \PHPUnit\Framework\MockObject\MockObject */ protected $util; - /** @var KeyManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var KeyManager | \PHPUnit\Framework\MockObject\MockObject */ protected $keyManager; - /** @var Crypt | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Crypt | \PHPUnit\Framework\MockObject\MockObject */ protected $crypt; - /** @var Session | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Session | \PHPUnit\Framework\MockObject\MockObject */ protected $session; - /** @var QuestionHelper | \PHPUnit_Framework_MockObject_MockObject */ + /** @var QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */ protected $questionHelper; protected function setUp(): void { diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php index bdc05035ea4..10d667bb4a8 100644 --- a/apps/encryption/tests/Crypto/EncryptAllTest.php +++ b/apps/encryption/tests/Crypto/EncryptAllTest.php @@ -49,43 +49,43 @@ use Test\TestCase; class EncryptAllTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Encryption\KeyManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\KeyManager */ protected $keyManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Encryption\Util */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\Util */ protected $util; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IUserManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IUserManager */ protected $userManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Encryption\Users\Setup */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\Users\Setup */ protected $setupUser; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Files\View */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Files\View */ protected $view; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IConfig */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Mail\IMailer */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Mail\IMailer */ protected $mailer; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IL10N */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IL10N */ protected $l; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Helper\QuestionHelper */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Helper\QuestionHelper */ protected $questionHelper; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */ protected $inputInterface; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */ protected $outputInterface; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\UserInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\UserInterface */ protected $userInterface; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Security\ISecureRandom */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Security\ISecureRandom */ protected $secureRandom; /** @var EncryptAll */ @@ -144,7 +144,7 @@ class EncryptAllTest extends TestCase { } public function testEncryptAll() { - /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */ + /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( [ @@ -172,7 +172,7 @@ class EncryptAllTest extends TestCase { } public function testEncryptAllWithMasterKey() { - /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */ + /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( [ @@ -201,7 +201,7 @@ class EncryptAllTest extends TestCase { } public function testCreateKeyPairs() { - /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */ + /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( [ @@ -250,7 +250,7 @@ class EncryptAllTest extends TestCase { } public function testEncryptAllUsersFiles() { - /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */ + /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( [ @@ -282,7 +282,7 @@ class EncryptAllTest extends TestCase { } public function testEncryptUsersFiles() { - /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */ + /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( [ diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index dee1118a992..c14ee22e879 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -47,31 +47,31 @@ class EncryptionTest extends TestCase { /** @var Encryption */ private $instance; - /** @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; - /** @var \OCA\Encryption\Crypto\EncryptAll|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Crypto\EncryptAll|\PHPUnit\Framework\MockObject\MockObject */ private $encryptAllMock; - /** @var \OCA\Encryption\Crypto\DecryptAll|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Crypto\DecryptAll|\PHPUnit\Framework\MockObject\MockObject */ private $decryptAllMock; - /** @var \OCA\Encryption\Session|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; - /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; - /** @var \OCA\Encryption\Util|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */ private $utilMock; - /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $loggerMock; - /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10nMock; - /** @var \OCP\Files\Storage|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Files\Storage|\PHPUnit\Framework\MockObject\MockObject */ private $storageMock; protected function setUp(): void { @@ -428,7 +428,7 @@ class EncryptionTest extends TestCase { ]; } - + public function testDecrypt() { $this->expectException(\OC\Encryption\Exceptions\DecryptionFailedException::class); $this->expectExceptionMessage('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.'); diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php index dcd82fe7e0f..74e2e7716d6 100644 --- a/apps/encryption/tests/Hooks/UserHooksTest.php +++ b/apps/encryption/tests/Hooks/UserHooksTest.php @@ -50,32 +50,32 @@ use Test\TestCase; */ class UserHooksTest extends TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $utilMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $recoveryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $userManagerMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $userSetupMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $userSessionMock; /** @@ -83,11 +83,11 @@ class UserHooksTest extends TestCase { */ private $user; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $loggerMock; /** @@ -162,7 +162,7 @@ class UserHooksTest extends TestCase { */ public function testPreSetPassphrase($canChange) { - /** @var UserHooks | \PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var UserHooks | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(UserHooks::class) ->setConstructorArgs( [ diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index da5777d75ab..78c506a18d0 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -58,25 +58,25 @@ class KeyManagerTest extends TestCase { /** @var string */ private $systemKeyId; - /** @var \OCP\Encryption\Keys\IStorage|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Encryption\Keys\IStorage|\PHPUnit\Framework\MockObject\MockObject */ private $keyStorageMock; - /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; - /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userMock; - /** @var \OCA\Encryption\Session|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; - /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logMock; - /** @var \OCA\Encryption\Util|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */ private $utilMock; - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $configMock; protected function setUp(): void { @@ -220,7 +220,7 @@ class KeyManagerTest extends TestCase { ]; } - + public function testUserHasKeysMissingPrivateKey() { $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); @@ -236,7 +236,7 @@ class KeyManagerTest extends TestCase { $this->instance->userHasKeys($this->userId); } - + public function testUserHasKeysMissingPublicKey() { $this->expectException(\OCA\Encryption\Exceptions\PublicKeyMissingException::class); @@ -259,7 +259,7 @@ class KeyManagerTest extends TestCase { */ public function testInit($useMasterKey) { - /** @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( [ @@ -532,7 +532,7 @@ class KeyManagerTest extends TestCase { ); } - + public function testGetMasterKeyPasswordException() { $this->expectException(\Exception::class); @@ -549,7 +549,7 @@ class KeyManagerTest extends TestCase { */ public function testValidateMasterKey($masterKey) { - /** @var \OCA\Encryption\KeyManager | \PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var \OCA\Encryption\KeyManager | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( [ diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php index df5dc3241c0..a5b531e51f4 100644 --- a/apps/encryption/tests/RecoveryTest.php +++ b/apps/encryption/tests/RecoveryTest.php @@ -42,15 +42,15 @@ use Test\TestCase; class RecoveryTest extends TestCase { private static $tempStorage = []; /** - * @var \OCP\Encryption\IFile|\PHPUnit_Framework_MockObject_MockObject + * @var \OCP\Encryption\IFile|\PHPUnit\Framework\MockObject\MockObject */ private $fileMock; /** - * @var \OC\Files\View|\PHPUnit_Framework_MockObject_MockObject + * @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */ private $viewMock; /** - * @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject + * @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSessionMock; /** @@ -58,15 +58,15 @@ class RecoveryTest extends TestCase { */ private $user; /** - * @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject + * @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; /** - * @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject + * @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $configMock; /** - * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject + * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; /** diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php index 19425cc8531..079f906d1d6 100644 --- a/apps/encryption/tests/SessionTest.php +++ b/apps/encryption/tests/SessionTest.php @@ -37,10 +37,10 @@ class SessionTest extends TestCase { * @var Session */ private $instance; - /** @var \OCP\ISession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\ISession|\PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; - + public function testThatGetPrivateKeyThrowsExceptionWhenNotSet() { $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); $this->expectExceptionMessage('Private Key missing for user: please try to log-out and log-in again'); @@ -119,7 +119,7 @@ class SessionTest extends TestCase { $this->instance->getDecryptAllKey(); } - + public function testSetAndGetStatusWillSetAndReturn() { // Check if get status will return 0 if it has not been set before $this->assertEquals(0, $this->instance->getStatus()); @@ -141,7 +141,7 @@ class SessionTest extends TestCase { * @param bool $expected */ public function testIsReady($status, $expected) { - /** @var Session | \PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var Session | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(Session::class) ->setConstructorArgs([$this->sessionMock]) ->setMethods(['getStatus'])->getMock(); @@ -186,7 +186,7 @@ class SessionTest extends TestCase { return null; } - + public function testClearWillRemoveValues() { $this->instance->setPrivateKey('privateKey'); $this->instance->setStatus('initStatus'); @@ -196,7 +196,7 @@ class SessionTest extends TestCase { $this->assertEmpty(self::$tempStorage); } - + protected function setUp(): void { parent::setUp(); $this->sessionMock = $this->createMock(ISession::class); diff --git a/apps/encryption/tests/Users/SetupTest.php b/apps/encryption/tests/Users/SetupTest.php index 44bb2e55e86..779bb5d82ea 100644 --- a/apps/encryption/tests/Users/SetupTest.php +++ b/apps/encryption/tests/Users/SetupTest.php @@ -35,11 +35,11 @@ use Test\TestCase; class SetupTest extends TestCase { /** - * @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject + * @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; /** - * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject + * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; /** diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php index 27c1469b031..5a573f278e4 100644 --- a/apps/encryption/tests/UtilTest.php +++ b/apps/encryption/tests/UtilTest.php @@ -44,16 +44,16 @@ use Test\TestCase; class UtilTest extends TestCase { private static $tempStorage = []; - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $configMock; - /** @var \OC\Files\View|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */ private $filesMock; - /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManagerMock; - /** @var \OCP\Files\Mount\IMountPoint|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Files\Mount\IMountPoint|\PHPUnit\Framework\MockObject\MockObject */ private $mountMock; /** @var Util */ |