3 class Sabre_DAV_Auth_Backend_ApacheTest extends PHPUnit_Framework_TestCase {
5 function testConstruct() {
7 $backend = new Sabre_DAV_Auth_Backend_Apache();
12 * @expectedException Sabre_DAV_Exception
14 function testNoHeader() {
16 $server = new Sabre_DAV_Server();
17 $backend = new Sabre_DAV_Auth_Backend_Apache();
18 $backend->authenticate($server,'Realm');
22 function testRemoteUser() {
24 $backend = new Sabre_DAV_Auth_Backend_Apache();
26 $server = new Sabre_DAV_Server();
27 $request = new Sabre_HTTP_Request(array(
28 'REMOTE_USER' => 'username',
30 $server->httpRequest = $request;
32 $this->assertTrue($backend->authenticate($server, 'Realm'));
34 $userInfo = 'username';
36 $this->assertEquals($userInfo, $backend->getCurrentUser());