public function testDispatchingWithRewrittenUri()
 {
     $_SERVER['SCRIPT_FILENAME'] = '/var/www/webdav/htdocs/path/to/webdav.php';
     $_SERVER['DOCUMENT_ROOT'] = '/var/www/webdav/htdocs/';
     $_SERVER['REQUEST_URI'] = '/path/to/webdav/collection/ressource';
     $factory = new ezcWebdavAutomaticPathFactory();
     $this->assertEquals('/webdav/collection/ressource', $factory->parseUriToPath($_SERVER['REQUEST_URI']));
 }
 public function testGenerateHttpsUriNoRewrite()
 {
     $_SERVER['SCRIPT_FILENAME'] = '/var/www/webdav/htdocs/path/to/webdav.php';
     $_SERVER['DOCUMENT_ROOT'] = '/var/www/webdav/htdocs/';
     $_SERVER['REQUEST_URI'] = '/path/to/webdav.php/collection/ressource';
     $_SERVER['HTTPS'] = 'on';
     $_SERVER['SERVER_NAME'] = 'webdav';
     $_SERVER['SERVER_PORT'] = '443';
     $factory = new ezcWebdavAutomaticPathFactory();
     $this->assertSame('https://webdav/path/to/webdav.php/collection/ressource', $factory->generateUriFromPath('/collection/ressource'));
 }