aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Encryption
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-11 21:32:18 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-12 13:55:19 +0200
commit234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch)
tree880cec2bf4fe4846eff9fa5aa68d2671fb0495be /tests/lib/Encryption
parent138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff)
downloadnextcloud-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 'tests/lib/Encryption')
-rw-r--r--tests/lib/Encryption/DecryptAllTest.php22
-rw-r--r--tests/lib/Encryption/EncryptionWrapperTest.php6
-rw-r--r--tests/lib/Encryption/Keys/StorageTest.php6
-rw-r--r--tests/lib/Encryption/ManagerTest.php16
-rw-r--r--tests/lib/Encryption/UpdateTest.php14
-rw-r--r--tests/lib/Encryption/UtilTest.php10
6 files changed, 37 insertions, 37 deletions
diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php
index 3a16327ac18..a8c6f6caebb 100644
--- a/tests/lib/Encryption/DecryptAllTest.php
+++ b/tests/lib/Encryption/DecryptAllTest.php
@@ -44,22 +44,22 @@ use Test\TestCase;
*/
class DecryptAllTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | IUserManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IUserManager */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | Manager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | Manager */
protected $encryptionManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | View */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | View */
protected $view;
- /** @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 DecryptAll */
@@ -112,7 +112,7 @@ class DecryptAllTest extends TestCase {
} else {
$this->userManager->expects($this->never())->method('userExists');
}
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject | $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject | $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
@@ -198,7 +198,7 @@ class DecryptAllTest extends TestCase {
*/
public function testDecryptAllUsersFiles($user) {
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject | $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject | $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
@@ -243,7 +243,7 @@ class DecryptAllTest extends TestCase {
}
public function testDecryptUsersFiles() {
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
@@ -313,7 +313,7 @@ class DecryptAllTest extends TestCase {
public function testDecryptFile($isEncrypted) {
$path = 'test.txt';
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
@@ -353,7 +353,7 @@ class DecryptAllTest extends TestCase {
public function testDecryptFileFailure() {
$path = 'test.txt';
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php
index 06d9116255f..20bcb6e7ca1 100644
--- a/tests/lib/Encryption/EncryptionWrapperTest.php
+++ b/tests/lib/Encryption/EncryptionWrapperTest.php
@@ -33,13 +33,13 @@ class EncryptionWrapperTest extends TestCase {
/** @var EncryptionWrapper */
private $instance;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\ILogger */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\ILogger */
private $logger;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Encryption\Manager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\Manager */
private $manager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Memcache\ArrayCache */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Memcache\ArrayCache */
private $arrayCache;
protected function setUp(): void {
diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php
index fd33077c78b..bd9bbdecdf1 100644
--- a/tests/lib/Encryption/Keys/StorageTest.php
+++ b/tests/lib/Encryption/Keys/StorageTest.php
@@ -33,13 +33,13 @@ class StorageTest extends TestCase {
/** @var Storage */
protected $storage;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $util;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $view;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
protected function setUp(): void {
diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php
index 47dd7fd01fb..81ac263cb93 100644
--- a/tests/lib/Encryption/ManagerTest.php
+++ b/tests/lib/Encryption/ManagerTest.php
@@ -17,22 +17,22 @@ class ManagerTest extends TestCase {
/** @var Manager */
private $manager;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var View|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var View|\PHPUnit\Framework\MockObject\MockObject */
private $view;
- /** @var Util|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Util|\PHPUnit\Framework\MockObject\MockObject */
private $util;
-
- /** @var ArrayCache|\PHPUnit_Framework_MockObject_MockObject */
+
+ /** @var ArrayCache|\PHPUnit\Framework\MockObject\MockObject */
private $arrayCache;
protected function setUp(): void {
@@ -100,7 +100,7 @@ class ManagerTest extends TestCase {
$this->assertEmpty($this->manager->getEncryptionModules());
}
-
+
public function testGetEncryptionModuleUnknown() {
$this->expectException(\OC\Encryption\Exceptions\ModuleDoesNotExistsException::class);
$this->expectExceptionMessage('Module with ID: unknown does not exist.');
diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php
index d7aa24d1f67..08fb08bf797 100644
--- a/tests/lib/Encryption/UpdateTest.php
+++ b/tests/lib/Encryption/UpdateTest.php
@@ -34,22 +34,22 @@ class UpdateTest extends TestCase {
/** @var string */
private $uid;
- /** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject */
private $view;
- /** @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Encryption\Util | \PHPUnit\Framework\MockObject\MockObject */
private $util;
- /** @var \OC\Files\Mount\Manager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\Mount\Manager | \PHPUnit\Framework\MockObject\MockObject */
private $mountManager;
- /** @var \OC\Encryption\Manager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Encryption\Manager | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionManager;
- /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionModule;
- /** @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Encryption\File | \PHPUnit\Framework\MockObject\MockObject */
private $fileHelper;
protected function setUp(): void {
@@ -212,7 +212,7 @@ class UpdateTest extends TestCase {
* create mock of the update method
*
* @param array$methods methods which should be set
- * @return \OC\Encryption\Update | \PHPUnit_Framework_MockObject_MockObject
+ * @return \OC\Encryption\Update | \PHPUnit\Framework\MockObject\MockObject
*/
protected function getUpdateMock($methods) {
return $this->getMockBuilder('\OC\Encryption\Update')
diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php
index e1d898f5a86..84d81dd1cbb 100644
--- a/tests/lib/Encryption/UtilTest.php
+++ b/tests/lib/Encryption/UtilTest.php
@@ -17,16 +17,16 @@ class UtilTest extends TestCase {
*/
protected $headerSize = 8192;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $view;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var \OC\Encryption\Util */
@@ -94,7 +94,7 @@ class UtilTest extends TestCase {
];
}
-
+
public function testCreateHeaderFailed() {
$this->expectException(\OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException::class);