summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2010-02-27 19:31:01 +0100
committerAndreas Gohr <andi@splitbrain.org>2010-02-28 11:00:20 +0100
commit1542144fa455b70975cbc45f1f8160472be717a0 (patch)
treeb1f3219c674bd4f44b5de6f0ef45921d1e4424a1 /_test
parent8d7fb8212341e6f1e33555853f94799f24fc1d98 (diff)
downloadrpg-1542144fa455b70975cbc45f1f8160472be717a0.tar.gz
rpg-1542144fa455b70975cbc45f1f8160472be717a0.tar.bz2
Added new testcase for getID with Apache/CGI
Diffstat (limited to '_test')
-rw-r--r--_test/cases/inc/pageutils_getid.test.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/_test/cases/inc/pageutils_getid.test.php b/_test/cases/inc/pageutils_getid.test.php
index 8233ffb42..14a21cae2 100644
--- a/_test/cases/inc/pageutils_getid.test.php
+++ b/_test/cases/inc/pageutils_getid.test.php
@@ -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 :