diff options
-rw-r--r-- | _test/cases/inc/pageutils_getID.test.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/_test/cases/inc/pageutils_getID.test.php b/_test/cases/inc/pageutils_getID.test.php new file mode 100644 index 000000000..33ff12c79 --- /dev/null +++ b/_test/cases/inc/pageutils_getID.test.php @@ -0,0 +1,27 @@ +<?php + +require_once DOKU_INC.'inc/pageutils.php'; + +class init_getID_test extends UnitTestCase { + + /** + * fetch media files with basedir and urlrewrite=2 + * + * data provided by Jan Decaluwe <jan@jandecaluwe.com> + */ + function test1(){ + global $conf; + $conf['basedir'] = '//'; + $conf['urlrewrite'] = 2; + $conf['deaccent'] = 0; // the default (1) gives me strange exceptions + + + $_SERVER['SCRIPT_FILENAME'] = '/lib/exe/fetch.php'; + $_SERVER['REQUEST_URI'] = '/lib/exe/fetch.php/myhdl-0.5dev1.tar.gz?id=snapshots&cache=cache'; + + $this->assertEqual(getID($param='not_id'), 'myhdl-0.5dev1.tar.gz'); + } + + +} + |