diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-25 22:21:27 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-25 22:21:27 +0100 |
commit | 2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch) | |
tree | 39075e87ea7927e20e8956824cb7c49bf626b178 /apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php | |
parent | 3cf321fdfc4235a87015a9af2f59c63220016c65 (diff) | |
download | nextcloud-server-2ee65f177e4f7e09ad2287f14d564e7068d322fb.tar.gz nextcloud-server-2ee65f177e4f7e09ad2287f14d564e7068d322fb.zip |
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php')
-rw-r--r-- | apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php index 194e9dc6e05..2ade2046e75 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php @@ -74,7 +74,7 @@ class BackupCodesProviderTest extends TestCase { $this->l10n->expects($this->once()) ->method('t') ->with('Backup code') - ->will($this->returnValue('l10n backup code')); + ->willReturn('l10n backup code'); $this->assertSame('l10n backup code', $this->provider->getDisplayName()); } @@ -82,7 +82,7 @@ class BackupCodesProviderTest extends TestCase { $this->l10n->expects($this->once()) ->method('t') ->with('Use backup code') - ->will($this->returnValue('l10n use backup code')); + ->willReturn('l10n use backup code'); $this->assertSame('l10n use backup code', $this->provider->getDescription()); } @@ -100,7 +100,7 @@ class BackupCodesProviderTest extends TestCase { $this->storage->expects($this->once()) ->method('validateCode') ->with($user, $challenge) - ->will($this->returnValue(false)); + ->willReturn(false); $this->assertFalse($this->provider->verifyChallenge($user, $challenge)); } @@ -111,7 +111,7 @@ class BackupCodesProviderTest extends TestCase { $this->storage->expects($this->once()) ->method('hasBackupCodes') ->with($user) - ->will($this->returnValue(true)); + ->willReturn(true); $this->assertTrue($this->provider->isTwoFactorAuthEnabledForUser($user)); } |