diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-02 10:29:05 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-09-06 09:29:27 +0200 |
commit | 0c154c1ed779ccd68ea67e3528fad36ad6ac9b34 (patch) | |
tree | 05a9f0d94c8730ed6de352b91a8db72c72ca957f /apps/encryption/tests/KeyManagerTest.php | |
parent | 831179971cf2d693cc09e4a216387d107567a47e (diff) | |
download | nextcloud-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.php | 12 |
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(); |