@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public static function init(array $autoload_dirs = null) |
24 | 24 | { |
25 | - if (! defined('TESTPATH')) { |
|
25 | + if ( ! defined('TESTPATH')) { |
|
26 | 26 | define('TESTPATH', APPPATH.'tests'.DIRECTORY_SEPARATOR); |
27 | 27 | } |
28 | 28 | |
@@ -39,38 +39,38 @@ discard block |
||
39 | 39 | $cwd_backup = getcwd(); |
40 | 40 | |
41 | 41 | // Load autoloader for ci-phpunit-test |
42 | - require __DIR__ . '/autoloader.php'; |
|
42 | + require __DIR__.'/autoloader.php'; |
|
43 | 43 | |
44 | - require TESTPATH . 'TestCase.php'; |
|
44 | + require TESTPATH.'TestCase.php'; |
|
45 | 45 | |
46 | - $db_test_case_file = TESTPATH . 'DbTestCase.php'; |
|
46 | + $db_test_case_file = TESTPATH.'DbTestCase.php'; |
|
47 | 47 | if (is_readable($db_test_case_file)) |
48 | 48 | { |
49 | 49 | require $db_test_case_file; |
50 | 50 | } |
51 | 51 | |
52 | - $unit_test_case_file = TESTPATH . 'UnitTestCase.php'; |
|
52 | + $unit_test_case_file = TESTPATH.'UnitTestCase.php'; |
|
53 | 53 | if (is_readable($unit_test_case_file)) |
54 | 54 | { |
55 | 55 | require $unit_test_case_file; |
56 | 56 | } |
57 | 57 | |
58 | 58 | // Replace a few Common functions |
59 | - require __DIR__ . '/replacing/core/Common.php'; |
|
60 | - require BASEPATH . 'core/Common.php'; |
|
59 | + require __DIR__.'/replacing/core/Common.php'; |
|
60 | + require BASEPATH.'core/Common.php'; |
|
61 | 61 | |
62 | 62 | // Workaround for missing CodeIgniter's error handler |
63 | 63 | // See https://github.com/kenjis/ci-phpunit-test/issues/37 |
64 | 64 | set_error_handler('_error_handler'); |
65 | 65 | |
66 | 66 | // Load new functions of CIPHPUnitTest |
67 | - require __DIR__ . '/functions.php'; |
|
67 | + require __DIR__.'/functions.php'; |
|
68 | 68 | // Load ci-phpunit-test CI_Loader |
69 | - require __DIR__ . '/replacing/core/Loader.php'; |
|
69 | + require __DIR__.'/replacing/core/Loader.php'; |
|
70 | 70 | // Load ci-phpunit-test CI_Input |
71 | - require __DIR__ . '/replacing/core/Input.php'; |
|
71 | + require __DIR__.'/replacing/core/Input.php'; |
|
72 | 72 | // Load ci-phpunit-test CI_Output |
73 | - require __DIR__ . '/replacing/core/Output.php'; |
|
73 | + require __DIR__.'/replacing/core/Output.php'; |
|
74 | 74 | |
75 | 75 | // Change current directory |
76 | 76 | chdir(FCPATH); |
@@ -82,12 +82,12 @@ discard block |
||
82 | 82 | * |
83 | 83 | * And away we go... |
84 | 84 | */ |
85 | - require __DIR__ . '/replacing/core/CodeIgniter.php'; |
|
85 | + require __DIR__.'/replacing/core/CodeIgniter.php'; |
|
86 | 86 | |
87 | 87 | self::replaceHelpers(); |
88 | 88 | |
89 | 89 | // Create CodeIgniter instance |
90 | - if (! self::wiredesignzHmvcInstalled()) |
|
90 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
91 | 91 | { |
92 | 92 | new CI_Controller(); |
93 | 93 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public static function createCodeIgniterInstance($use_my_controller = false) |
114 | 114 | { |
115 | - if (! self::wiredesignzHmvcInstalled()) |
|
115 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
116 | 116 | { |
117 | 117 | if ($use_my_controller && self::hasMyController()) |
118 | 118 | { |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | $my_controller_file = |
140 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Controller.php'; |
|
140 | + APPPATH.'core/'.config_item('subclass_prefix').'Controller.php'; |
|
141 | 141 | |
142 | 142 | if (file_exists($my_controller_file)) |
143 | 143 | { |
144 | - $controller_class = config_item('subclass_prefix') . 'Controller'; |
|
144 | + $controller_class = config_item('subclass_prefix').'Controller'; |
|
145 | 145 | if ( ! class_exists($controller_class)) |
146 | 146 | { |
147 | 147 | require $my_controller_file; |
@@ -173,11 +173,11 @@ discard block |
||
173 | 173 | protected static function replaceLoader() |
174 | 174 | { |
175 | 175 | $my_loader_file = |
176 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php'; |
|
176 | + APPPATH.'core/'.config_item('subclass_prefix').'Loader.php'; |
|
177 | 177 | |
178 | 178 | if (file_exists($my_loader_file)) |
179 | 179 | { |
180 | - self::$loader_class = config_item('subclass_prefix') . 'Loader'; |
|
180 | + self::$loader_class = config_item('subclass_prefix').'Loader'; |
|
181 | 181 | if ( ! class_exists(self::$loader_class)) |
182 | 182 | { |
183 | 183 | require $my_loader_file; |
@@ -189,11 +189,11 @@ discard block |
||
189 | 189 | protected static function replaceConfig() |
190 | 190 | { |
191 | 191 | $my_config_file = |
192 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Config.php'; |
|
192 | + APPPATH.'core/'.config_item('subclass_prefix').'Config.php'; |
|
193 | 193 | |
194 | 194 | if (file_exists($my_config_file)) |
195 | 195 | { |
196 | - self::$config_class = config_item('subclass_prefix') . 'Config'; |
|
196 | + self::$config_class = config_item('subclass_prefix').'Config'; |
|
197 | 197 | if ( ! class_exists(self::$config_class)) |
198 | 198 | { |
199 | 199 | require $my_config_file; |
@@ -212,19 +212,19 @@ discard block |
||
212 | 212 | |
213 | 213 | protected static function loadHelper($helper) |
214 | 214 | { |
215 | - $my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . $helper . '.php'; |
|
215 | + $my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php'; |
|
216 | 216 | if (file_exists($my_helper_file)) |
217 | 217 | { |
218 | 218 | require $my_helper_file; |
219 | 219 | } |
220 | - require __DIR__ . '/replacing/helpers/' . $helper . '.php'; |
|
220 | + require __DIR__.'/replacing/helpers/'.$helper.'.php'; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | public static function setPatcherCacheDir($dir = null) |
224 | 224 | { |
225 | 225 | if ($dir === null) |
226 | 226 | { |
227 | - $dir = TESTPATH . '_ci_phpunit_test/tmp/cache'; |
|
227 | + $dir = TESTPATH.'_ci_phpunit_test/tmp/cache'; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | MonkeyPatchManager::setCacheDir( |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | |
241 | 241 | public static function loadConfig() |
242 | 242 | { |
243 | - $config= new self::$config_class; |
|
243 | + $config = new self::$config_class; |
|
244 | 244 | load_class_instance('Config', $config); |
245 | 245 | } |
246 | 246 | } |