diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/user/session.php | 22 |
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' ]) |