function testRedirectRemoteUser()
 {
     $backend = new Apache();
     $server = new DAV\Server();
     $request = HTTP\Sapi::createFromServerArray(['REDIRECT_REMOTE_USER' => 'username']);
     $server->httpRequest = $request;
     $this->assertTrue($backend->authenticate($server, 'Realm'));
     $userInfo = 'username';
     $this->assertEquals($userInfo, $backend->getCurrentUser());
 }
Beispiel #2
0
 function testRemoteUser()
 {
     $backend = new Apache();
     $server = new DAV\Server();
     $request = new HTTP\Request(array('REMOTE_USER' => 'username'));
     $server->httpRequest = $request;
     $this->assertTrue($backend->authenticate($server, 'Realm'));
     $userInfo = 'username';
     $this->assertEquals($userInfo, $backend->getCurrentUser());
 }