diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 16:13:54 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 16:13:54 +0200 |
commit | 1ea7f14f0a0986e4e78ead038b8601475ad71df6 (patch) | |
tree | 9178ddf8b474cdcce6406260b82c9a445d43d858 /tests/lib | |
parent | 26bf0ca9d42150efd2cd42d624d863908769f510 (diff) | |
download | nextcloud-server-1ea7f14f0a0986e4e78ead038b8601475ad71df6.tar.gz nextcloud-server-1ea7f14f0a0986e4e78ead038b8601475ad71df6.zip |
Fix SessionTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/User/SessionTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
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); } |