aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests/UtilTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-02 10:29:05 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-09-06 09:29:27 +0200
commit0c154c1ed779ccd68ea67e3528fad36ad6ac9b34 (patch)
tree05a9f0d94c8730ed6de352b91a8db72c72ca957f /apps/encryption/tests/UtilTest.php
parent831179971cf2d693cc09e4a216387d107567a47e (diff)
downloadnextcloud-server-0c154c1ed779ccd68ea67e3528fad36ad6ac9b34.tar.gz
nextcloud-server-0c154c1ed779ccd68ea67e3528fad36ad6ac9b34.zip
Fix getMock encryption
Diffstat (limited to 'apps/encryption/tests/UtilTest.php')
-rw-r--r--apps/encryption/tests/UtilTest.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php
index 84a9ad493d7..d2f1d40e16d 100644
--- a/apps/encryption/tests/UtilTest.php
+++ b/apps/encryption/tests/UtilTest.php
@@ -26,7 +26,12 @@
namespace OCA\Encryption\Tests;
+use OC\Files\View;
use OCA\Encryption\Util;
+use OCP\Files\Mount\IMountPoint;
+use OCP\IConfig;
+use OCP\ILogger;
+use OCP\IUserManager;
use Test\TestCase;
class UtilTest extends TestCase {
@@ -70,16 +75,16 @@ class UtilTest extends TestCase {
protected function setUp() {
parent::setUp();
- $this->mountMock = $this->getMock('\OCP\Files\Mount\IMountPoint');
- $this->filesMock = $this->getMock('OC\Files\View');
- $this->userManagerMock = $this->getMock('\OCP\IUserManager');
+ $this->mountMock = $this->createMock(IMountPoint::class);
+ $this->filesMock = $this->createMock(View::class);
+ $this->userManagerMock = $this->createMock(IUserManager::class);
/** @var \OCA\Encryption\Crypto\Crypt $cryptMock */
$cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
->disableOriginalConstructor()
->getMock();
/** @var \OCP\ILogger $loggerMock */
- $loggerMock = $this->getMock('OCP\ILogger');
+ $loggerMock = $this->createMock(ILogger::class);
/** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSessionMock */
$userSessionMock = $this->getMockBuilder('OCP\IUserSession')
->disableOriginalConstructor()
@@ -102,7 +107,7 @@ class UtilTest extends TestCase {
->will($this->returnSelf());
- $this->configMock = $this->getMock('OCP\IConfig');
+ $this->configMock = $this->createMock(IConfig::class);
$this->configMock->expects($this->any())
->method('getUserValue')