diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/User/SessionTest.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index 63497ac35de..d6e0263da52 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -595,25 +595,24 @@ class SessionTest extends \Test\TestCase { ->method('setUserValue') ->with('foo', 'login_token', 'abcdefg123456', 10000); - $session->expects($this->once()) - ->method('getId') - ->will($this->returnValue($sessionId)); - $this->tokenProvider->expects($this->once()) - ->method('renewSessionToken') - ->with($oldSessionId, $sessionId) - ->will($this->returnValue(true)); - $tokenObject = $this->createMock(IToken::class); $tokenObject->expects($this->once()) ->method('getLoginName') ->willReturn('foobar'); $tokenObject->method('getId') ->willReturn(42); + + $session->expects($this->once()) + ->method('getId') + ->will($this->returnValue($sessionId)); $this->tokenProvider->expects($this->once()) - ->method('getToken') - ->with($sessionId) + ->method('renewSessionToken') + ->with($oldSessionId, $sessionId) ->willReturn($tokenObject); + $this->tokenProvider->expects($this->never()) + ->method('getToken'); + $user->expects($this->any()) ->method('getUID') ->will($this->returnValue('foo')); |