aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/connector/sabre/auth.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-24 17:51:49 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-24 17:51:49 +0200
commitd3fb5d618ea5902c989c39d72fd6ac2e5bcb65ed (patch)
tree815818e3077c629a5b5fe8a63213e4867546d5b6 /apps/dav/tests/unit/connector/sabre/auth.php
parente8c37943081975b01f5dedc2284892a5335322f8 (diff)
parentad10485cec4377119aa14749e8e4aeda6e707f8e (diff)
downloadnextcloud-server-d3fb5d618ea5902c989c39d72fd6ac2e5bcb65ed.tar.gz
nextcloud-server-d3fb5d618ea5902c989c39d72fd6ac2e5bcb65ed.zip
Merge pull request #24748 from owncloud/login-explicitly
Log in explicitly, save login name when generating browser/device tokens
Diffstat (limited to 'apps/dav/tests/unit/connector/sabre/auth.php')
-rw-r--r--apps/dav/tests/unit/connector/sabre/auth.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/dav/tests/unit/connector/sabre/auth.php b/apps/dav/tests/unit/connector/sabre/auth.php
index a0168e435e2..42be21d90fe 100644
--- a/apps/dav/tests/unit/connector/sabre/auth.php
+++ b/apps/dav/tests/unit/connector/sabre/auth.php
@@ -149,7 +149,7 @@ class Auth extends TestCase {
$user = $this->getMockBuilder('\OCP\IUser')
->disableOriginalConstructor()
->getMock();
- $user->expects($this->exactly(3))
+ $user->expects($this->exactly(4))
->method('getUID')
->will($this->returnValue('MyTestUser'));
$this->userSession
@@ -157,7 +157,7 @@ class Auth extends TestCase {
->method('isLoggedIn')
->will($this->returnValue(true));
$this->userSession
- ->expects($this->exactly(3))
+ ->expects($this->exactly(4))
->method('getUser')
->will($this->returnValue($user));
$this->session
@@ -173,7 +173,7 @@ class Auth extends TestCase {
$this->userSession
->expects($this->once())
->method('createSessionToken')
- ->with($this->request, 'MyTestUser', 'MyTestPassword');
+ ->with($this->request, 'MyTestUser', 'MyTestUser', 'MyTestPassword');
$this->session
->expects($this->once())
->method('set')
@@ -569,11 +569,11 @@ class Auth extends TestCase {
$user = $this->getMockBuilder('\OCP\IUser')
->disableOriginalConstructor()
->getMock();
- $user->expects($this->exactly(3))
+ $user->expects($this->exactly(4))
->method('getUID')
->will($this->returnValue('MyTestUser'));
$this->userSession
- ->expects($this->exactly(3))
+ ->expects($this->exactly(4))
->method('getUser')
->will($this->returnValue($user));
$response = $this->auth->check($server->httpRequest, $server->httpResponse);