Fix SessionTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
26bf0ca9d4
commit
1ea7f14f0a
|
@ -434,6 +434,9 @@ class SessionTest extends \Test\TestCase {
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->with('token_auth_enforced', false)
|
->with('token_auth_enforced', false)
|
||||||
->will($this->returnValue(false));
|
->will($this->returnValue(false));
|
||||||
|
$manager->method('getByEmail')
|
||||||
|
->with('unexist')
|
||||||
|
->willReturn([]);
|
||||||
|
|
||||||
$this->assertFalse($userSession->logClientIn('unexist', 'doe', $request, $this->throttler));
|
$this->assertFalse($userSession->logClientIn('unexist', 'doe', $request, $this->throttler));
|
||||||
}
|
}
|
||||||
|
@ -1163,6 +1166,10 @@ class SessionTest extends \Test\TestCase {
|
||||||
->method('getTime')
|
->method('getTime')
|
||||||
->will($this->returnValue(100));
|
->will($this->returnValue(100));
|
||||||
|
|
||||||
|
$manager->method('getByEmail')
|
||||||
|
->with('john')
|
||||||
|
->willReturn([]);
|
||||||
|
|
||||||
$userSession->logClientIn('john', 'doe', $request, $this->throttler);
|
$userSession->logClientIn('john', 'doe', $request, $this->throttler);
|
||||||
|
|
||||||
$this->assertEquals(10000, $token->getLastActivity());
|
$this->assertEquals(10000, $token->getLastActivity());
|
||||||
|
@ -1213,6 +1220,10 @@ class SessionTest extends \Test\TestCase {
|
||||||
->method('getTime')
|
->method('getTime')
|
||||||
->will($this->returnValue(100));
|
->will($this->returnValue(100));
|
||||||
|
|
||||||
|
$manager->method('getByEmail')
|
||||||
|
->with('john')
|
||||||
|
->willReturn([]);
|
||||||
|
|
||||||
$userSession->logClientIn('john', 'doe', $request, $this->throttler);
|
$userSession->logClientIn('john', 'doe', $request, $this->throttler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue