Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/twofactor_gateway.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2018-04-11 00:18:39 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2018-04-11 00:18:39 +0300
commitd098e0da41e106b14cfd051e16611568ccfd5c28 (patch)
tree134ad09b9ba9e65bdb4df98cb13970b8b274017b /tests
parent116eb533538de29679f0a873b010132ee984264e (diff)
Fix unit test
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Provider/SmsProviderTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/Unit/Provider/SmsProviderTest.php b/tests/Unit/Provider/SmsProviderTest.php
index 1aa2f5f..5cf65ce 100644
--- a/tests/Unit/Provider/SmsProviderTest.php
+++ b/tests/Unit/Provider/SmsProviderTest.php
@@ -28,6 +28,7 @@ use OCA\TwoFactorSms\Service\ISmsService;
use OCP\IConfig;
use OCP\IL10N;
use OCP\ISession;
+use OCP\Security\ISecureRandom;
use PHPUnit_Framework_MockObject_MockObject;
class SmsProviderTest extends TestCase {
@@ -38,6 +39,9 @@ class SmsProviderTest extends TestCase {
/** @var ISession|PHPUnit_Framework_MockObject_MockObject */
private $session;
+ /** @var ISecureRandom|PHPUnit_Framework_MockObject_MockObject */
+ private $random;
+
/** @var IConfig|PHPUnit_Framework_MockObject_MockObject */
private $config;
@@ -52,10 +56,11 @@ class SmsProviderTest extends TestCase {
$this->smsService = $this->createMock(ISmsService::class);
$this->session = $this->createMock(ISession::class);
+ $this->random = $this->createMock(ISecureRandom::class);
$this->config = $this->createMock(IConfig::class);
$this->l10n = $this->createMock(IL10N::class);
- $this->provider = new SmsProvider($this->smsService, $this->session, $this->config, $this->l10n);
+ $this->provider = new SmsProvider($this->smsService, $this->session, $this->random, $this->config, $this->l10n);
}
public function testSomething() {