Skip to content
Snippets Groups Projects
Commit 7c90ff2a authored by michael's avatar michael
Browse files

Added testcase for dokuwiki url rewriting and dokuwiki outside of document root.

Ignore-this: d38dd22b55ddb7ac94d28fa048130672

darcs-hash:20090514155859-074e0-c9a5eecc8295c1de748b67ec517798d88bf4119e.gz
parent b8219d2d
No related branches found
No related tags found
No related merge requests found
......@@ -45,5 +45,21 @@ class init_getID_test extends UnitTestCase {
$this->assertEqual(getID('media',false), 'wiki/discussion/button-dw.png');
}
/**
* getID with given id in url and userewrite=2, no basedir set, dokuwiki not in document root.
*/
function test3() {
global $conf;
$conf['basedir'] = '';
$conf['userewrite'] = '2';
$conf['baseurl'] = '';
$_SERVER['DOCUMENT_ROOT'] = '/var/www/';
$_SERVER['SCRIPT_FILENAME'] = '/usr/share/dokuwiki/doku.php';
$_SERVER['SCRIPT_NAME'] = '/dokuwiki/doku.php';
$_SERVER['REQUEST_URI'] = '/dokuwiki/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