diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-29 09:29:29 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-18 22:11:54 +0200 |
commit | 4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da (patch) | |
tree | 2f23ee511ab06b17128ab123765bac93c9b82ef1 /tests/Settings | |
parent | 1f17010e0b4099b41cc72f53e18f4d162ce2e3da (diff) | |
download | nextcloud-server-4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da.tar.gz nextcloud-server-4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da.zip |
Just pass uid to the Token stuff
We don't have user objects in the code everywhere
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/Settings')
-rw-r--r-- | tests/Settings/Controller/AuthSettingsControllerTest.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php index 461b32b7a48..1c957299e39 100644 --- a/tests/Settings/Controller/AuthSettingsControllerTest.php +++ b/tests/Settings/Controller/AuthSettingsControllerTest.php @@ -75,13 +75,9 @@ class AuthSettingsControllerTest extends TestCase { $sessionToken = new DefaultToken(); $sessionToken->setId(100); - $this->userManager->expects($this->once()) - ->method('get') - ->with($this->uid) - ->will($this->returnValue($this->user)); $this->tokenProvider->expects($this->once()) ->method('getTokenByUser') - ->with($this->user) + ->with($this->uid) ->will($this->returnValue($tokens)); $this->session->expects($this->once()) ->method('getId') @@ -192,13 +188,9 @@ class AuthSettingsControllerTest extends TestCase { $id = 123; $user = $this->createMock(IUser::class); - $this->userManager->expects($this->once()) - ->method('get') - ->with($this->uid) - ->will($this->returnValue($user)); $this->tokenProvider->expects($this->once()) ->method('invalidateTokenById') - ->with($user, $id); + ->with($this->uid, $id); $this->assertEquals([], $this->controller->destroy($id)); } |