aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/security/LoginManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/security/LoginManagerTest.php')
-rw-r--r--tests/security/LoginManagerTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/security/LoginManagerTest.php b/tests/security/LoginManagerTest.php
index f26cd1eb..b9ab5ec4 100644
--- a/tests/security/LoginManagerTest.php
+++ b/tests/security/LoginManagerTest.php
@@ -260,6 +260,20 @@ class LoginManagerTest extends TestCase
260 } 260 }
261 261
262 /** 262 /**
263 * Generate a token depending on the user credentials with session protected disabled
264 */
265 public function testGenerateStaySignedInTokenSessionProtectionDisabled()
266 {
267 $this->configManager->set('security.session_protection_disabled', true);
268 $this->loginManager->generateStaySignedInToken($this->clientIpAddress);
269
270 $this->assertEquals(
271 sha1($this->passwordHash . $this->salt),
272 $this->loginManager->getStaySignedInToken()
273 );
274 }
275
276 /**
263 * Check user login - Shaarli has not yet been configured 277 * Check user login - Shaarli has not yet been configured
264 */ 278 */
265 public function testCheckLoginStateNotConfigured() 279 public function testCheckLoginStateNotConfigured()