diff options
Diffstat (limited to '_test/core')
-rw-r--r-- | _test/core/DokuWikiTest.php | 7 | ||||
-rw-r--r-- | _test/core/TestRequest.php | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index 91eb5293b..4e40d510a 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -54,7 +54,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { foreach (array('default','local','protected') as $config_group) { if (empty($config_cascade['main'][$config_group])) continue; foreach ($config_cascade['main'][$config_group] as $config_file) { - if (@file_exists($config_file)) { + if (file_exists($config_file)) { include($config_file); } } @@ -68,7 +68,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { foreach (array('default','local') as $config_group) { if (empty($config_cascade['license'][$config_group])) continue; foreach ($config_cascade['license'][$config_group] as $config_file) { - if(@file_exists($config_file)){ + if(file_exists($config_file)){ include($config_file); } } @@ -115,5 +115,8 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { // reload language $local = $conf['lang']; trigger_event('INIT_LANG_LOAD', $local, 'init_lang', true); + + global $INPUT; + $INPUT = new Input(); } } diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index 0a54910ed..dad2060e5 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -44,13 +44,16 @@ class TestRequest { * @return TestResponse the resulting output of the request */ public function execute($uri='/doku.php') { + global $INPUT; + // save old environment $server = $_SERVER; $session = $_SESSION; $get = $_GET; $post = $_POST; $request = $_REQUEST; - + $input = $INPUT; + // prepare the right URI $this->setUri($uri); @@ -74,6 +77,7 @@ class TestRequest { // now execute dokuwiki and grep the output header_remove(); ob_start('ob_start_callback'); + $INPUT = new Input(); include(DOKU_INC.$this->script); ob_end_flush(); @@ -89,6 +93,7 @@ class TestRequest { $_GET = $get; $_POST = $post; $_REQUEST = $request; + $INPUT = $input; return $response; } |