mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Use a more realistic server environment in unit tests
This commit is contained in:
parent
b088348be2
commit
ca7a7b64ea
9 changed files with 81 additions and 98 deletions
|
|
@ -1,6 +1,17 @@
|
|||
<?php
|
||||
// This is global bootstrap for autoloading
|
||||
require dirname(__DIR__) . '/common/autoload.php';
|
||||
|
||||
// Set some superglobal variables for unit tests.
|
||||
$_SERVER['HTTPS'] = 'on';
|
||||
$_SERVER['HTTP_HOST'] = 'www.rhymix.org';
|
||||
$_SERVER['SERVER_NAME'] = 'www.rhymix.org';
|
||||
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
|
||||
$_SERVER['DOCUMENT_ROOT'] = dirname(dirname(__DIR__));
|
||||
$_SERVER['SCRIPT_FILENAME'] = dirname(__DIR__) . '/index.php';
|
||||
$_SERVER['SCRIPT_NAME'] = '/rhymix/index.php';
|
||||
$_SERVER['REQUEST_URI'] = '/rhymix/index.php';
|
||||
|
||||
// Include the autoloader.
|
||||
require_once dirname(__DIR__) . '/common/autoload.php';
|
||||
|
||||
function _debug() {
|
||||
$args = func_get_args();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue