@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public static function init(array $autoload_dirs = null) |
| 23 | 23 | { |
| 24 | - if (! defined('TESTPATH')) { |
|
| 24 | + if ( ! defined('TESTPATH')) { |
|
| 25 | 25 | define('TESTPATH', APPPATH.'tests'.DIRECTORY_SEPARATOR); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -38,38 +38,38 @@ discard block |
||
| 38 | 38 | $cwd_backup = getcwd(); |
| 39 | 39 | |
| 40 | 40 | // Load autoloader for ci-phpunit-test |
| 41 | - require __DIR__ . '/autoloader.php'; |
|
| 41 | + require __DIR__.'/autoloader.php'; |
|
| 42 | 42 | |
| 43 | - require TESTPATH . 'TestCase.php'; |
|
| 43 | + require TESTPATH.'TestCase.php'; |
|
| 44 | 44 | |
| 45 | - $db_test_case_file = TESTPATH . 'DbTestCase.php'; |
|
| 45 | + $db_test_case_file = TESTPATH.'DbTestCase.php'; |
|
| 46 | 46 | if (is_readable($db_test_case_file)) |
| 47 | 47 | { |
| 48 | 48 | require $db_test_case_file; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $unit_test_case_file = TESTPATH . 'UnitTestCase.php'; |
|
| 51 | + $unit_test_case_file = TESTPATH.'UnitTestCase.php'; |
|
| 52 | 52 | if (is_readable($unit_test_case_file)) |
| 53 | 53 | { |
| 54 | 54 | require $unit_test_case_file; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | // Replace a few Common functions |
| 58 | - require __DIR__ . '/replacing/core/Common.php'; |
|
| 59 | - require BASEPATH . 'core/Common.php'; |
|
| 58 | + require __DIR__.'/replacing/core/Common.php'; |
|
| 59 | + require BASEPATH.'core/Common.php'; |
|
| 60 | 60 | |
| 61 | 61 | // Workaround for missing CodeIgniter's error handler |
| 62 | 62 | // See https://github.com/kenjis/ci-phpunit-test/issues/37 |
| 63 | 63 | set_error_handler('_error_handler'); |
| 64 | 64 | |
| 65 | 65 | // Load new functions of CIPHPUnitTest |
| 66 | - require __DIR__ . '/functions.php'; |
|
| 66 | + require __DIR__.'/functions.php'; |
|
| 67 | 67 | // Load ci-phpunit-test CI_Loader |
| 68 | - require __DIR__ . '/replacing/core/Loader.php'; |
|
| 68 | + require __DIR__.'/replacing/core/Loader.php'; |
|
| 69 | 69 | // Load ci-phpunit-test CI_Input |
| 70 | - require __DIR__ . '/replacing/core/Input.php'; |
|
| 70 | + require __DIR__.'/replacing/core/Input.php'; |
|
| 71 | 71 | // Load ci-phpunit-test CI_Output |
| 72 | - require __DIR__ . '/replacing/core/Output.php'; |
|
| 72 | + require __DIR__.'/replacing/core/Output.php'; |
|
| 73 | 73 | |
| 74 | 74 | // Change current directory |
| 75 | 75 | chdir(FCPATH); |
@@ -84,10 +84,10 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * And away we go... |
| 86 | 86 | */ |
| 87 | - require __DIR__ . '/replacing/core/CodeIgniter.php'; |
|
| 87 | + require __DIR__.'/replacing/core/CodeIgniter.php'; |
|
| 88 | 88 | |
| 89 | 89 | // Create CodeIgniter instance |
| 90 | - if (! self::wiredesignzHmvcInstalled()) |
|
| 90 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
| 91 | 91 | { |
| 92 | 92 | new CI_Controller(); |
| 93 | 93 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public static function createCodeIgniterInstance($use_my_controller = false) |
| 113 | 113 | { |
| 114 | - if (! self::wiredesignzHmvcInstalled()) |
|
| 114 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
| 115 | 115 | { |
| 116 | 116 | if ($use_my_controller && self::hasMyController()) |
| 117 | 117 | { |
@@ -136,11 +136,11 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | $my_controller_file = |
| 139 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Controller.php'; |
|
| 139 | + APPPATH.'core/'.config_item('subclass_prefix').'Controller.php'; |
|
| 140 | 140 | |
| 141 | 141 | if (file_exists($my_controller_file)) |
| 142 | 142 | { |
| 143 | - $controller_class = config_item('subclass_prefix') . 'Controller'; |
|
| 143 | + $controller_class = config_item('subclass_prefix').'Controller'; |
|
| 144 | 144 | if ( ! class_exists($controller_class)) |
| 145 | 145 | { |
| 146 | 146 | require $my_controller_file; |
@@ -172,11 +172,11 @@ discard block |
||
| 172 | 172 | protected static function replaceLoader() |
| 173 | 173 | { |
| 174 | 174 | $my_loader_file = |
| 175 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php'; |
|
| 175 | + APPPATH.'core/'.config_item('subclass_prefix').'Loader.php'; |
|
| 176 | 176 | |
| 177 | 177 | if (file_exists($my_loader_file)) |
| 178 | 178 | { |
| 179 | - self::$loader_class = config_item('subclass_prefix') . 'Loader'; |
|
| 179 | + self::$loader_class = config_item('subclass_prefix').'Loader'; |
|
| 180 | 180 | if ( ! class_exists(self::$loader_class)) |
| 181 | 181 | { |
| 182 | 182 | require $my_loader_file; |
@@ -195,19 +195,19 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | protected static function loadHelper($helper) |
| 197 | 197 | { |
| 198 | - $my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . $helper . '.php'; |
|
| 198 | + $my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php'; |
|
| 199 | 199 | if (file_exists($my_helper_file)) |
| 200 | 200 | { |
| 201 | 201 | require $my_helper_file; |
| 202 | 202 | } |
| 203 | - require __DIR__ . '/replacing/helpers/' . $helper . '.php'; |
|
| 203 | + require __DIR__.'/replacing/helpers/'.$helper.'.php'; |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | public static function setPatcherCacheDir($dir = null) |
| 207 | 207 | { |
| 208 | 208 | if ($dir === null) |
| 209 | 209 | { |
| 210 | - $dir = TESTPATH . '_ci_phpunit_test/tmp/cache'; |
|
| 210 | + $dir = TESTPATH.'_ci_phpunit_test/tmp/cache'; |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | MonkeyPatchManager::setCacheDir( |