summaryrefslogtreecommitdiff
path: root/tests/units/Auth/ReverseProxyTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
committerFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
commite9fedf3e5cd63aea4da7a71f6647ee427c62fa49 (patch)
treeabc2de5aebace4a2d7c94805552264dab6b10bc7 /tests/units/Auth/ReverseProxyTest.php
parent346b8312e5ac877ce3192c2db3a26b500018bbb5 (diff)
Rewrite of the authentication and authorization system
Diffstat (limited to 'tests/units/Auth/ReverseProxyTest.php')
-rw-r--r--tests/units/Auth/ReverseProxyTest.php37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/units/Auth/ReverseProxyTest.php b/tests/units/Auth/ReverseProxyTest.php
deleted file mode 100644
index 6aaa5a67..00000000
--- a/tests/units/Auth/ReverseProxyTest.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-require_once __DIR__.'/../Base.php';
-
-use Kanboard\Auth\ReverseProxy;
-use Kanboard\Model\User;
-
-class ReverseProxyTest extends Base
-{
- public function setUp()
- {
- parent::setup();
- $_SERVER = array();
- }
-
- public function testFailedAuthentication()
- {
- $auth = new ReverseProxy($this->container);
- $this->assertFalse($auth->authenticate());
- }
-
- public function testSuccessfulAuthentication()
- {
- $_SERVER[REVERSE_PROXY_USER_HEADER] = 'my_user';
-
- $a = new ReverseProxy($this->container);
- $u = new User($this->container);
-
- $this->assertTrue($a->authenticate());
-
- $user = $u->getByUsername('my_user');
- $this->assertNotEmpty($user);
- $this->assertEquals(0, $user['is_admin']);
- $this->assertEquals(1, $user['is_ldap_user']);
- $this->assertEquals(1, $user['disable_login_form']);
- }
-}