use OCA\Encryption\HookManager;
+use OCP\IConfig;
use Test\TestCase;
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');
->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')
->with($user)
->will($this->returnValue($codes));
$this->hasher->expects($this->never())
- ->method('verifiy');
+ ->method('verify');
$this->mapper->expects($this->never())
->method('update');