mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix unit tests and misuse of global scope
This commit is contained in:
parent
19ec92fc68
commit
08e7f7e32a
5 changed files with 4 additions and 6 deletions
|
|
@ -46,7 +46,7 @@ if(file_exists(RX_BASEDIR . 'config/config.user.inc.php'))
|
||||||
/**
|
/**
|
||||||
* Define the list of legacy class names for the autoloader.
|
* Define the list of legacy class names for the autoloader.
|
||||||
*/
|
*/
|
||||||
$RX_AUTOLOAD_FILE_MAP = array_change_key_case(array(
|
$GLOBALS['RX_AUTOLOAD_FILE_MAP'] = array_change_key_case(array(
|
||||||
'CacheBase' => 'classes/cache/CacheHandler.class.php',
|
'CacheBase' => 'classes/cache/CacheHandler.class.php',
|
||||||
'CacheHandler' => 'classes/cache/CacheHandler.class.php',
|
'CacheHandler' => 'classes/cache/CacheHandler.class.php',
|
||||||
'Context' => 'classes/context/Context.class.php',
|
'Context' => 'classes/context/Context.class.php',
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ foreach($dsn as $piece) {
|
||||||
$dbinfo[$key] = $val;
|
$dbinfo[$key] = $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(\Filehandler::exists(_XE_PATH_ . 'config/install.config.php')) {
|
if(file_exists(_XE_PATH_ . 'config/install.config.php')) {
|
||||||
$I->deleteFile(_XE_PATH_ . 'config/install.config.php');
|
$I->deleteFile(_XE_PATH_ . 'config/install.config.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
require_once( _XE_PATH_.'config/func.inc.php');
|
|
||||||
|
|
||||||
class FuncIncTest extends \Codeception\TestCase\Test
|
class FuncIncTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
// Here you can initialize variables that will be available to your tests
|
||||||
$_SERVER['SCRIPT_NAME'] = '/xe/index.php';
|
$_SERVER['SCRIPT_NAME'] = '/xe/index.php';
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
// This is global bootstrap for autoloading
|
// This is global bootstrap for autoloading
|
||||||
if(!defined('__XE__')) define('__XE__', true);
|
require dirname(__DIR__) . '/common/autoload.php';
|
||||||
if(!defined('_XE_PATH_')) define('_XE_PATH_', realpath(dirname(__FILE__).'/../').'/');
|
|
||||||
require_once _XE_PATH_.'config/config.inc.php';
|
|
||||||
|
|
||||||
function _debug() {
|
function _debug() {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue