aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-18 16:31:53 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-18 16:31:53 +0200
commit6231b72e250f275c30228d0738155b78c2333576 (patch)
treea90bf06e5ad4418c92c698f65b05fcdac6b402d6 /tests
parenteea3c99af6444bba68245da4ac43775145e93977 (diff)
parent98b465a8b9c6900f12ca2efa5d51036b6ccc4b8b (diff)
downloadnextcloud-server-6231b72e250f275c30228d0738155b78c2333576.tar.gz
nextcloud-server-6231b72e250f275c30228d0738155b78c2333576.zip
Merge pull request #24677 from owncloud/single-token-provider
a single token provider suffices
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/user/session.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/lib/user/session.php b/tests/lib/user/session.php
index c6ddeb416fb..710d5ae20b3 100644
--- a/tests/lib/user/session.php
+++ b/tests/lib/user/session.php
@@ -88,7 +88,7 @@ class Session extends \Test\TestCase {
->with($expectedUser->getUID())
->will($this->returnValue($expectedUser));
- $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]);
+ $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider);
$user = $userSession->getUser();
$this->assertSame($expectedUser, $user);
}
@@ -111,7 +111,7 @@ class Session extends \Test\TestCase {
->getMock();
$userSession = $this->getMockBuilder('\OC\User\Session')
- ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]])
+ ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider])
->setMethods([
'getUser'
])
@@ -138,7 +138,7 @@ class Session extends \Test\TestCase {
->method('getUID')
->will($this->returnValue('foo'));
- $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]);
+ $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider);
$userSession->setUser($user);
}
@@ -190,7 +190,7 @@ class Session extends \Test\TestCase {
->will($this->returnValue($user));
$userSession = $this->getMockBuilder('\OC\User\Session')
- ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]])
+ ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider])
->setMethods([
'prepareUserLogin'
])
@@ -237,7 +237,7 @@ class Session extends \Test\TestCase {
->with('foo', 'bar')
->will($this->returnValue($user));
- $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]);
+ $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider);
$userSession->login('foo', 'bar');
}
@@ -273,7 +273,7 @@ class Session extends \Test\TestCase {
->with('foo', 'bar')
->will($this->returnValue(false));
- $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]);
+ $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider);
$userSession->login('foo', 'bar');
}
@@ -293,7 +293,7 @@ class Session extends \Test\TestCase {
->with('foo', 'bar')
->will($this->returnValue(false));
- $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]);
+ $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider);
$userSession->login('foo', 'bar');
}
@@ -348,7 +348,7 @@ class Session extends \Test\TestCase {
//override, otherwise tests will fail because of setcookie()
array('setMagicInCookie'),
//there are passed as parameters to the constructor
- array($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]));
+ array($manager, $session, $this->timeFactory, $this->defaultProvider));
$granted = $userSession->loginWithCookie('foo', $token);
@@ -393,7 +393,7 @@ class Session extends \Test\TestCase {
$token = 'goodToken';
\OC::$server->getConfig()->setUserValue('foo', 'login_token', $token, time());
- $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]);
+ $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider);
$granted = $userSession->loginWithCookie('foo', 'badToken');
$this->assertSame($granted, false);
@@ -436,7 +436,7 @@ class Session extends \Test\TestCase {
$token = 'goodToken';
\OC::$server->getConfig()->setUserValue('foo', 'login_token', $token, time());
- $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]);
+ $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider);
$granted = $userSession->loginWithCookie('foo', $token);
$this->assertSame($granted, false);
@@ -461,7 +461,7 @@ class Session extends \Test\TestCase {
$session = new Memory('');
$session->set('user_id', 'foo');
$userSession = $this->getMockBuilder('\OC\User\Session')
- ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]])
+ ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider])
->setMethods([
'validateSession'
])