summaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests/KeyManagerTest.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/KeyManagerTest.php
parent831179971cf2d693cc09e4a216387d107567a47e (diff)
downloadnextcloud-server-0c154c1ed779ccd68ea67e3528fad36ad6ac9b34.tar.gz
nextcloud-server-0c154c1ed779ccd68ea67e3528fad36ad6ac9b34.zip
Fix getMock encryption
Diffstat (limited to 'apps/encryption/tests/KeyManagerTest.php')
-rw-r--r--apps/encryption/tests/KeyManagerTest.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php
index 9ac3befdfcb..fec311afa35 100644
--- a/apps/encryption/tests/KeyManagerTest.php
+++ b/apps/encryption/tests/KeyManagerTest.php
@@ -29,6 +29,10 @@ namespace OCA\Encryption\Tests;
use OCA\Encryption\KeyManager;
use OCA\Encryption\Session;
+use OCP\Encryption\Keys\IStorage;
+use OCP\IConfig;
+use OCP\ILogger;
+use OCP\IUserSession;
use Test\TestCase;
class KeyManagerTest extends TestCase {
@@ -69,19 +73,19 @@ class KeyManagerTest extends TestCase {
parent::setUp();
$this->userId = 'user1';
$this->systemKeyId = 'systemKeyId';
- $this->keyStorageMock = $this->getMock('OCP\Encryption\Keys\IStorage');
+ $this->keyStorageMock = $this->createMock(IStorage::class);
$this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
->disableOriginalConstructor()
->getMock();
- $this->configMock = $this->getMock('OCP\IConfig');
+ $this->configMock = $this->createMock(IConfig::class);
$this->configMock->expects($this->any())
->method('getAppValue')
->willReturn($this->systemKeyId);
- $this->userMock = $this->getMock('OCP\IUserSession');
+ $this->userMock = $this->createMock(IUserSession::class);
$this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session')
->disableOriginalConstructor()
->getMock();
- $this->logMock = $this->getMock('OCP\ILogger');
+ $this->logMock = $this->createMock(ILogger::class);
$this->utilMock = $this->getMockBuilder('OCA\Encryption\Util')
->disableOriginalConstructor()
->getMock();