From 9a5e1c6a185496cf9afa30ddc6b2b4c00cfd62cc Mon Sep 17 00:00:00 2001 From: Tobias Sarnowski Date: Mon, 16 Apr 2012 13:35:21 +0000 Subject: fixed configuration loading and datadir misdirection --- _testing/integrationtests/bootstrap.php | 104 -------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 _testing/integrationtests/bootstrap.php (limited to '_testing/integrationtests/bootstrap.php') diff --git a/_testing/integrationtests/bootstrap.php b/_testing/integrationtests/bootstrap.php deleted file mode 100644 index e7029247f..000000000 --- a/_testing/integrationtests/bootstrap.php +++ /dev/null @@ -1,104 +0,0 @@ - '127.0.0.1', - ); - - var $get_vars = array(); - var $post_vars = array(); - - var $output = ''; - - function __construct($page = '') { - $this->setPage($page); - } - - function setServerVar($varName, $varValue) { - $this->sevrer_vars[$varName] = $varValue; - } - - function setGetVar($varName, $varValue) { - $this->get_vars[$varName] = $varValue; - } - - function setPostVar($varName, $varValue) { - $this->post_vars[$varName] = $varValue; - } - - function setPage($pageName) { - $this->setGetVar('id', $pageName); - } - - function execute() { - global $output_buffer; - $output_buffer = ''; - - // fake php environment - foreach ($this->server_vars as $key => $value) { - $_SERVER[$key] = $value; - } - $_REQUEST = array(); - $_GET = array(); - foreach ($this->get_vars as $key => $value) { - $_GET[$key] = $value; - $_REQUEST[$key] = $value; - } - $_POST = array(); - foreach ($this->post_vars as $key => $value) { - $_POST[$key] = $value; - $_REQUEST[$key] = $value; - } - - // now execute dokuwiki and grep the output - header_remove(); - ob_start('ob_start_callback'); - include(DOKU_INC.'doku.php'); - ob_end_flush(); - - // it's done, return the page result - return new TestResponse( - $output_buffer, - headers_list() - ); - } -} - -// holds a copy of all produced outputs of a TestRequest -class TestResponse { - var $content; - var $headers; - - function __construct($content, $headers) { - $this->content = $content; - $this->headers = $headers; - } - - function getContent() { - return $this->content; - } - - function getHeaders() { - return $this->headers; - } -} -- cgit v1.2.3