aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/User/SessionTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2016-06-27 22:16:22 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-06-27 22:16:22 +0200
commit1710de8afbb1d7acc2025642893da791bd6caefa (patch)
tree4b346b20c0346579a9bb0aff62444442e545894d /tests/lib/User/SessionTest.php
parent88ef163276fc030006a061358f42746b59c489f3 (diff)
downloadnextcloud-server-1710de8afbb1d7acc2025642893da791bd6caefa.tar.gz
nextcloud-server-1710de8afbb1d7acc2025642893da791bd6caefa.zip
Login hooks (#25260)
* fix login hooks * adjust user session tests * fix login return value of successful token logins * trigger preLogin hook earlier; extract method 'loginWithPassword' * call postLogin hook earlier; add PHPDoc
Diffstat (limited to 'tests/lib/User/SessionTest.php')
-rw-r--r--tests/lib/User/SessionTest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php
index 447c6142f34..9bde2c664b6 100644
--- a/tests/lib/User/SessionTest.php
+++ b/tests/lib/User/SessionTest.php
@@ -729,6 +729,9 @@ class SessionTest extends \Test\TestCase {
$this->assertFalse($userSession->createSessionToken($request, $uid, $loginName, $password));
}
+ /**
+ * @expectedException \OC\User\LoginException
+ */
public function testTryTokenLoginWithDisabledUser() {
$manager = $this->getMockBuilder('\OC\User\Manager')
->disableOriginalConstructor()
@@ -761,7 +764,7 @@ class SessionTest extends \Test\TestCase {
->method('isEnabled')
->will($this->returnValue(false));
- $this->assertFalse($userSession->tryTokenLogin($request));
+ $userSession->tryTokenLogin($request);
}
public function testValidateSessionDisabledUser() {