diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/legacy/LegacyControllerTest.php | 8 | ||||
-rw-r--r-- | tests/security/SessionManagerTest.php | 13 |
2 files changed, 12 insertions, 9 deletions
diff --git a/tests/legacy/LegacyControllerTest.php b/tests/legacy/LegacyControllerTest.php index 759a5b2a..4e52f3e1 100644 --- a/tests/legacy/LegacyControllerTest.php +++ b/tests/legacy/LegacyControllerTest.php | |||
@@ -66,11 +66,11 @@ class LegacyControllerTest extends TestCase | |||
66 | { | 66 | { |
67 | return [ | 67 | return [ |
68 | ['post', [], '/admin/shaare', true], | 68 | ['post', [], '/admin/shaare', true], |
69 | ['post', [], '/login', false], | 69 | ['post', [], '/login?returnurl=/subfolder/admin/shaare', false], |
70 | ['post', ['title' => 'test'], '/admin/shaare?title=test', true], | 70 | ['post', ['title' => 'test'], '/admin/shaare?title=test', true], |
71 | ['post', ['title' => 'test'], '/login?title=test', false], | 71 | ['post', ['title' => 'test'], '/login?returnurl=/subfolder/admin/shaare?title=test', false], |
72 | ['addlink', [], '/admin/add-shaare', true], | 72 | ['addlink', [], '/admin/add-shaare', true], |
73 | ['addlink', [], '/login', false], | 73 | ['addlink', [], '/login?returnurl=/subfolder/admin/add-shaare', false], |
74 | ['login', [], '/login', true], | 74 | ['login', [], '/login', true], |
75 | ['login', [], '/login', false], | 75 | ['login', [], '/login', false], |
76 | ['logout', [], '/admin/logout', true], | 76 | ['logout', [], '/admin/logout', true], |
@@ -94,6 +94,8 @@ class LegacyControllerTest extends TestCase | |||
94 | ['opensearch', [], '/open-search', true], | 94 | ['opensearch', [], '/open-search', true], |
95 | ['dailyrss', [], '/daily-rss', false], | 95 | ['dailyrss', [], '/daily-rss', false], |
96 | ['dailyrss', [], '/daily-rss', true], | 96 | ['dailyrss', [], '/daily-rss', true], |
97 | ['configure', [], '/login?returnurl=/subfolder/admin/configure', false], | ||
98 | ['configure', [], '/admin/configure', true], | ||
97 | ]; | 99 | ]; |
98 | } | 100 | } |
99 | } | 101 | } |
diff --git a/tests/security/SessionManagerTest.php b/tests/security/SessionManagerTest.php index 60695dcf..11a59f9c 100644 --- a/tests/security/SessionManagerTest.php +++ b/tests/security/SessionManagerTest.php | |||
@@ -207,15 +207,16 @@ class SessionManagerTest extends TestCase | |||
207 | 'expires_on' => time() + 1000, | 207 | 'expires_on' => time() + 1000, |
208 | 'username' => 'johndoe', | 208 | 'username' => 'johndoe', |
209 | 'visibility' => 'public', | 209 | 'visibility' => 'public', |
210 | 'untaggedonly' => false, | 210 | 'untaggedonly' => true, |
211 | ]; | 211 | ]; |
212 | $this->sessionManager->logout(); | 212 | $this->sessionManager->logout(); |
213 | 213 | ||
214 | $this->assertFalse(isset($this->session['ip'])); | 214 | $this->assertArrayNotHasKey('ip', $this->session); |
215 | $this->assertFalse(isset($this->session['expires_on'])); | 215 | $this->assertArrayNotHasKey('expires_on', $this->session); |
216 | $this->assertFalse(isset($this->session['username'])); | 216 | $this->assertArrayNotHasKey('username', $this->session); |
217 | $this->assertFalse(isset($this->session['visibility'])); | 217 | $this->assertArrayNotHasKey('visibility', $this->session); |
218 | $this->assertFalse(isset($this->session['untaggedonly'])); | 218 | $this->assertArrayHasKey('untaggedonly', $this->session); |
219 | $this->assertTrue($this->session['untaggedonly']); | ||
219 | } | 220 | } |
220 | 221 | ||
221 | /** | 222 | /** |