Skip to content

Commit

Permalink
New testcase for getID() with data from FS#1838
Browse files Browse the repository at this point in the history
  • Loading branch information
michitux committed Mar 2, 2010
1 parent 06368e4 commit 83e9d7a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions _test/cases/inc/pageutils_getid.test.php
Expand Up @@ -83,5 +83,24 @@ function test4() {
$this->assertEqual(getID(), 'wiki:dokuwiki');
}

/**
* getID with given id / in url and userewrite=2, no basedir set, Apache and CGI.
*/
function test5() {
global $conf;
$conf['basedir'] = '';
$conf['userewrite'] = '2';
$conf['baseurl'] = '';
$_SERVER['DOCUMENT_ROOT'] = '/var/www/';
$_SERVER['SCRIPT_FILENAME'] = '/var/www/dokuwiki/doku.php';
$_SERVER['SCRIPT_NAME'] = '/dokuwiki/doku.php';
$_SERVER['REQUEST_URI'] = '/dokuwiki/doku.php/?do=debug';
$_SERVER['PATH_INFO'] = '/';
$_SERVER['PATH_TRANSLATED'] = '/var/www/index.html';
$_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/';

$this->assertEqual(getID(), 'start');
}

}
//Setup VIM: ex: et ts=4 enc=utf-8 :

0 comments on commit 83e9d7a

Please sign in to comment.