Fix SessionTest

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/5791/head
Roeland Jago Douma 9 years ago
parent 26bf0ca9d4
commit 1ea7f14f0a
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 11
      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);
}

Loading…
Cancel
Save