diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-12-13 15:15:14 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-12-19 11:59:48 +0100 |
commit | ed4017dfb4d605943988c6686b088b41d1680110 (patch) | |
tree | c50d57d247c46b20e514f10f3b381820c2578b4f /apps/twofactor_backupcodes/tests | |
parent | 93003120461648140ee244b345cfcb6690071faa (diff) | |
download | nextcloud-server-ed4017dfb4d605943988c6686b088b41d1680110.tar.gz nextcloud-server-ed4017dfb4d605943988c6686b088b41d1680110.zip |
fix minor issues
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/twofactor_backupcodes/tests')
-rw-r--r-- | apps/twofactor_backupcodes/tests/Unit/Activity/GenericFilterTest.php | 3 | ||||
-rw-r--r-- | apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/twofactor_backupcodes/tests/Unit/Activity/GenericFilterTest.php b/apps/twofactor_backupcodes/tests/Unit/Activity/GenericFilterTest.php index a367a18fe95..ca24c0be647 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Activity/GenericFilterTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Activity/GenericFilterTest.php @@ -26,7 +26,6 @@ use OCA\TwoFactorBackupCodes\Activity\GenericFilter; use OCP\IL10N; use OCP\IURLGenerator; use Test\TestCase; -use function returnValue; class GenericFilterTest extends TestCase { @@ -46,7 +45,7 @@ class GenericFilterTest extends TestCase { } public function testAllowedApps() { - $this->assertEquals(0, $this->filter->allowedApps()); + $this->assertEquals([], $this->filter->allowedApps()); } public function testFilterTypes() { diff --git a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php index fbaac0220aa..54738f74600 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php @@ -27,6 +27,7 @@ use OCA\TwoFactorBackupCodes\Db\BackupCodeMapper; use OCA\TwoFactorBackupCodes\Service\BackupCodeStorage; use OCP\Activity\IEvent; use OCP\Activity\IManager; +use OCP\ILogger; use OCP\IUser; use OCP\Security\IHasher; use OCP\Security\ISecureRandom; @@ -46,6 +47,9 @@ class BackupCodeStorageTest extends TestCase { /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ private $activityManager; + /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + private $logger; + /** @var BackupCodeStorage */ private $storage; @@ -58,7 +62,9 @@ class BackupCodeStorageTest extends TestCase { $this->random = $this->getMockBuilder(ISecureRandom::class)->getMock(); $this->hasher = $this->getMockBuilder(IHasher::class)->getMock(); $this->activityManager = $this->createMock(IManager::class); - $this->storage = new BackupCodeStorage($this->mapper, $this->random, $this->hasher, $this->activityManager); + $this->logger = $this->createMock(ILogger::class); + + $this->storage = new BackupCodeStorage($this->mapper, $this->random, $this->hasher, $this->activityManager, $this->logger); } public function testCreateCodes() { |