From 1ea7f14f0a0986e4e78ead038b8601475ad71df6 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 9 Aug 2017 16:13:54 +0200 Subject: Fix SessionTest Signed-off-by: Roeland Jago Douma --- tests/lib/User/SessionTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index fcff4f64726..c4d29b979ae 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -434,6 +434,9 @@ class SessionTest extends \Test\TestCase { ->method('getSystemValue') ->with('token_auth_enforced', false) ->will($this->returnValue(false)); + $manager->method('getByEmail') + ->with('unexist') + ->willReturn([]); $this->assertFalse($userSession->logClientIn('unexist', 'doe', $request, $this->throttler)); } @@ -1163,6 +1166,10 @@ class SessionTest extends \Test\TestCase { ->method('getTime') ->will($this->returnValue(100)); + $manager->method('getByEmail') + ->with('john') + ->willReturn([]); + $userSession->logClientIn('john', 'doe', $request, $this->throttler); $this->assertEquals(10000, $token->getLastActivity()); @@ -1213,6 +1220,10 @@ class SessionTest extends \Test\TestCase { ->method('getTime') ->will($this->returnValue(100)); + $manager->method('getByEmail') + ->with('john') + ->willReturn([]); + $userSession->logClientIn('john', 'doe', $request, $this->throttler); } -- cgit v1.2.3