Skip to content
Snippets Groups Projects
Commit 1542144f authored by Michael Hamann's avatar Michael Hamann Committed by Andreas Gohr
Browse files

Added new testcase for getID with Apache/CGI

parent 8d7fb821
No related branches found
No related tags found
No related merge requests found
......@@ -64,5 +64,24 @@ class init_getID_test extends UnitTestCase {
$this->assertEqual(getID(), 'wiki:dokuwiki');
}
/**
* getID with given id in url and userewrite=2, no basedir set, Apache and CGI.
*/
function test4() {
global $conf;
$conf['basedir'] = '';
$conf['userewrite'] = '2';
$conf['baseurl'] = '';
$_SERVER['DOCUMENT_ROOT'] = '/var/www/vhosts/example.com/htdocs';
$_SERVER['SCRIPT_FILENAME'] = '/var/www/vhosts/example.com/htdocs/doku.php';
$_SERVER['SCRIPT_NAME'] = '/doku.php';
$_SERVER['REQUEST_URI'] = '/doku.php/wiki/dokuwiki';
$_SERVER['PATH_INFO'] = '/test/dokuwiki';
$_SERVER['PATH_TRANSLATED'] = '/var/www/vhosts/example.com/htdocs/doku.php';
$_SERVER['PHP_SELF'] = '/doku.php/wiki/dokuwiki';
$this->assertEqual(getID(), 'wiki:dokuwiki');
}
}
//Setup VIM: ex: et ts=4 enc=utf-8 :
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment