]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix apps warnings 1314/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 7 Sep 2016 18:34:47 +0000 (20:34 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 7 Sep 2016 18:42:38 +0000 (20:42 +0200)
apps/encryption/tests/HookManagerTest.php
apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php

index 1154368fa3f9dd3bfbeeea58b1950042aac65c17..c5e5487dba5805664884eb66658e2083160731bb 100644 (file)
@@ -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');
index 04c51fa7e14542bdbcfbdbe6173fd8f0a672dd3e..57c262e1940d2e7259c8c1d702c7d7605651143b 100644 (file)
@@ -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');