diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-06-28 16:43:01 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-06-29 00:12:21 +0200 |
commit | 0189bd8669742c5290a4f6538f954b81554e26d2 (patch) | |
tree | ecc5e6cac52f3c164321209ed7efcaa075d6dac7 | |
parent | 44b0470cb5f4a7e78a12354f552748afe03861b9 (diff) | |
download | rpg-0189bd8669742c5290a4f6538f954b81554e26d2.tar.gz rpg-0189bd8669742c5290a4f6538f954b81554e26d2.tar.bz2 |
make sure all globals are available in test requests
-rw-r--r-- | _test/core/TestRequest.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index 9047f7e88..66760b1e0 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -46,6 +46,11 @@ class TestRequest { $post = $_POST; $request = $_REQUEST; + // import all defined globals into the function scope + foreach(array_keys($GLOBALS) as $glb){ + global $$glb; + } + // fake environment global $default_server_vars; $_SERVER = array_merge($default_server_vars, $this->server); @@ -58,9 +63,6 @@ class TestRequest { global $output_buffer; $output_buffer = ''; - // make globals available as were in a function context here FIXME: any others needed? - global $INPUT; - // now execute dokuwiki and grep the output header_remove(); ob_start('ob_start_callback'); |