From 680b557a4b906c3ef39daa2bd9e8eb1eae80a9d2 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 7 Sep 2016 20:34:47 +0200 Subject: [PATCH] Fix apps warnings --- apps/encryption/tests/HookManagerTest.php | 3 ++- .../tests/Unit/Service/BackupCodeStorageTest.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/encryption/tests/HookManagerTest.php b/apps/encryption/tests/HookManagerTest.php index 1154368fa3f..c5e5487dba5 100644 --- a/apps/encryption/tests/HookManagerTest.php +++ b/apps/encryption/tests/HookManagerTest.php @@ -26,6 +26,7 @@ namespace OCA\Encryption\Tests; use OCA\Encryption\HookManager; +use OCP\IConfig; use Test\TestCase; class HookManagerTest extends TestCase { @@ -42,7 +43,7 @@ class HookManagerTest extends TestCase { self::$instance->registerHook([ $this->getMockBuilder('OCA\Encryption\Hooks\Contracts\IHook')->disableOriginalConstructor()->getMock(), $this->getMockBuilder('OCA\Encryption\Hooks\Contracts\IHook')->disableOriginalConstructor()->getMock(), - $this->getMock('NotIHook') + $this->createMock(IConfig::class) ]); $hookInstances = self::invokePrivate(self::$instance, 'hookInstances'); diff --git a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php index 04c51fa7e14..57c262e1940 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php @@ -170,7 +170,7 @@ class BackupCodeStorageTest extends TestCase { ->will($this->returnValue($codes)); $this->hasher->expects($this->once()) ->method('verify') - ->with('CHALLENGE', 'HASHEDVALUE') + ->with('CHALLENGE', 'HASHEDVALUE', $this->anything()) ->will($this->returnValue(true)); $this->mapper->expects($this->once()) ->method('update') @@ -195,7 +195,7 @@ class BackupCodeStorageTest extends TestCase { ->with($user) ->will($this->returnValue($codes)); $this->hasher->expects($this->never()) - ->method('verifiy'); + ->method('verify'); $this->mapper->expects($this->never()) ->method('update'); -- 2.39.5