From 08e7f7e32a881dfc4afc4bbc9bd09614ab53082b Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 16 Jan 2016 14:05:51 +0900 Subject: [PATCH] Fix unit tests and misuse of global scope --- common/autoload.php | 2 +- tests/Install/InstallCept.php | 2 +- tests/Unit/FuncIncTest.php | 1 - tests/Unit/_bootstrap.php | 1 + tests/_bootstrap.php | 4 +--- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/common/autoload.php b/common/autoload.php index dc9361c63..64fbc3c41 100644 --- a/common/autoload.php +++ b/common/autoload.php @@ -46,7 +46,7 @@ if(file_exists(RX_BASEDIR . 'config/config.user.inc.php')) /** * 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', 'CacheHandler' => 'classes/cache/CacheHandler.class.php', 'Context' => 'classes/context/Context.class.php', diff --git a/tests/Install/InstallCept.php b/tests/Install/InstallCept.php index b574fdb22..f62cb718f 100644 --- a/tests/Install/InstallCept.php +++ b/tests/Install/InstallCept.php @@ -22,7 +22,7 @@ foreach($dsn as $piece) { $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'); } diff --git a/tests/Unit/FuncIncTest.php b/tests/Unit/FuncIncTest.php index e201f6c8c..bcd0e364b 100644 --- a/tests/Unit/FuncIncTest.php +++ b/tests/Unit/FuncIncTest.php @@ -1,5 +1,4 @@