diff options
Diffstat (limited to 'tests/lib/Authentication/TwoFactorAuth/ManagerTest.php')
-rw-r--r-- | tests/lib/Authentication/TwoFactorAuth/ManagerTest.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index 63d0e993f3b..b5cea26e73f 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -126,7 +126,7 @@ class ManagerTest extends TestCase { private function prepareNoProviders() { $this->providerLoader->method('getProviders') ->with($this->user) - ->will($this->returnValue([])); + ->willReturn([]); } private function prepareProviders() { @@ -366,11 +366,11 @@ class ManagerTest extends TestCase { $this->fakeProvider->expects($this->once()) ->method('verifyChallenge') ->with($this->user, $challenge) - ->will($this->returnValue(true)); + ->willReturn(true); $this->session->expects($this->once()) ->method('get') ->with('two_factor_remember_login') - ->will($this->returnValue(false)); + ->willReturn(false); $this->session->expects($this->at(1)) ->method('remove') ->with('two_factor_auth_uid'); @@ -449,7 +449,7 @@ class ManagerTest extends TestCase { $this->fakeProvider->expects($this->once()) ->method('verifyChallenge') ->with($this->user, $challenge) - ->will($this->returnValue(false)); + ->willReturn(false); $this->session->expects($this->never()) ->method('remove'); $this->activityManager->expects($this->once()) @@ -496,7 +496,7 @@ class ManagerTest extends TestCase { $this->session->expects($this->at(1)) ->method('exists') ->with('two_factor_auth_uid') - ->will($this->returnValue(false)); + ->willReturn(false); $this->session->expects($this->at(2)) ->method('exists') ->with(Manager::SESSION_UID_DONE) @@ -557,7 +557,7 @@ class ManagerTest extends TestCase { $this->session->expects($this->never()) ->method('exists') ->with('two_factor_auth_uid') - ->will($this->returnValue(true)); + ->willReturn(true); $this->session->expects($this->never()) ->method('remove') ->with('two_factor_auth_uid'); @@ -567,7 +567,7 @@ class ManagerTest extends TestCase { public function testPrepareTwoFactorLogin() { $this->user->method('getUID') - ->will($this->returnValue('ferdinand')); + ->willReturn('ferdinand'); $this->session->expects($this->at(0)) ->method('set') @@ -597,7 +597,7 @@ class ManagerTest extends TestCase { public function testPrepareTwoFactorLoginDontRemember() { $this->user->method('getUID') - ->will($this->returnValue('ferdinand')); + ->willReturn('ferdinand'); $this->session->expects($this->at(0)) ->method('set') @@ -630,14 +630,14 @@ class ManagerTest extends TestCase { ->willReturn('user'); $this->session->method('exists') - ->will($this->returnCallback(function ($var) { + ->willReturnCallback(function ($var) { if ($var === Manager::SESSION_UID_KEY) { return false; } else if ($var === 'app_password') { return false; } return true; - })); + }); $this->session->expects($this->once()) ->method('get') ->with(Manager::SESSION_UID_DONE) |