diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-02-17 01:46:27 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2018-05-29 22:53:54 +0200 |
commit | 63ea23c2a67d2a1cf6cda79fa2fe49a143571cde (patch) | |
tree | 984bc2b373f1a0d190df3f2bbda74b63b1c9b949 /tests/LoginManagerTest.php | |
parent | 49f183231662c642ca9df6ceabf43fe128a5ffc1 (diff) | |
download | Shaarli-63ea23c2a67d2a1cf6cda79fa2fe49a143571cde.tar.gz Shaarli-63ea23c2a67d2a1cf6cda79fa2fe49a143571cde.tar.zst Shaarli-63ea23c2a67d2a1cf6cda79fa2fe49a143571cde.zip |
Refactor user credential validation at login time
Changed:
- move login/password verification to LoginManager
- code cleanup
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/LoginManagerTest.php')
-rw-r--r-- | tests/LoginManagerTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/LoginManagerTest.php b/tests/LoginManagerTest.php index 4159038e..27ca0db5 100644 --- a/tests/LoginManagerTest.php +++ b/tests/LoginManagerTest.php | |||
@@ -38,7 +38,7 @@ class LoginManagerTest extends TestCase | |||
38 | $this->globals = &$GLOBALS; | 38 | $this->globals = &$GLOBALS; |
39 | unset($this->globals['IPBANS']); | 39 | unset($this->globals['IPBANS']); |
40 | 40 | ||
41 | $this->loginManager = new LoginManager($this->globals, $this->configManager); | 41 | $this->loginManager = new LoginManager($this->globals, $this->configManager, null); |
42 | $this->server['REMOTE_ADDR'] = $this->ipAddr; | 42 | $this->server['REMOTE_ADDR'] = $this->ipAddr; |
43 | } | 43 | } |
44 | 44 | ||
@@ -59,7 +59,7 @@ class LoginManagerTest extends TestCase | |||
59 | $this->banFile, | 59 | $this->banFile, |
60 | "<?php\n\$GLOBALS['IPBANS']=array('FAILURES' => array('127.0.0.1' => 99));\n?>" | 60 | "<?php\n\$GLOBALS['IPBANS']=array('FAILURES' => array('127.0.0.1' => 99));\n?>" |
61 | ); | 61 | ); |
62 | new LoginManager($this->globals, $this->configManager); | 62 | new LoginManager($this->globals, $this->configManager, null); |
63 | $this->assertEquals(99, $this->globals['IPBANS']['FAILURES']['127.0.0.1']); | 63 | $this->assertEquals(99, $this->globals['IPBANS']['FAILURES']['127.0.0.1']); |
64 | } | 64 | } |
65 | 65 | ||