Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-05-29 10:29:29 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-18 23:11:54 +0300
commit4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da (patch)
tree2f23ee511ab06b17128ab123765bac93c9b82ef1 /tests/Settings
parent1f17010e0b4099b41cc72f53e18f4d162ce2e3da (diff)
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.php12
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));
}