@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * NOTE: If you change these, also change the error_reporting() code below |
55 | 55 | */ |
56 | 56 | // This `if` statemant is needed for @runInSeparateProcess |
57 | -if (! defined('ENVIRONMENT')) |
|
57 | +if ( ! defined('ENVIRONMENT')) |
|
58 | 58 | { |
59 | 59 | define('ENVIRONMENT', 'testing'); |
60 | 60 | } |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
233 | 233 | |
234 | 234 | // Path to the test directory containing all the test files. |
235 | - define('TESTPATH', __dir__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in. |
|
235 | + define('TESTPATH', __dir__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in. |
|
236 | 236 | |
237 | 237 | // Path to the system directory |
238 | 238 | define('BASEPATH', $system_path); |
@@ -314,9 +314,9 @@ discard block |
||
314 | 314 | define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR); |
315 | 315 | |
316 | 316 | // Path to the ci-phpunit-test directory |
317 | - if (is_dir(TESTPATH . '_ci_phpunit_test')) |
|
317 | + if (is_dir(TESTPATH.'_ci_phpunit_test')) |
|
318 | 318 | { |
319 | - define('CI_PHPUNIT_TESTPATH', TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR); |
|
319 | + define('CI_PHPUNIT_TESTPATH', TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR); |
|
320 | 320 | } |
321 | 321 | else |
322 | 322 | { |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | define('TESTPATH', APPPATH.'tests'.DIRECTORY_SEPARATOR); |
380 | 380 | */ |
381 | 381 | |
382 | -require CI_PHPUNIT_TESTPATH . '/CIPHPUnitTest.php'; |
|
382 | +require CI_PHPUNIT_TESTPATH.'/CIPHPUnitTest.php'; |
|
383 | 383 | |
384 | 384 | CIPHPUnitTest::init(); |
385 | 385 | // Or you can set directories for autoloading |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public static function init(array $autoload_dirs = null) |
22 | 22 | { |
23 | - if (! defined('TESTPATH')) { |
|
23 | + if ( ! defined('TESTPATH')) { |
|
24 | 24 | define('TESTPATH', APPPATH.'tests'.DIRECTORY_SEPARATOR); |
25 | 25 | } |
26 | 26 | // Current Bootstrap.php should define this, but in case it doesn't: |
27 | - if (! defined('CI_PHPUNIT_TESTPATH')) { |
|
27 | + if ( ! defined('CI_PHPUNIT_TESTPATH')) { |
|
28 | 28 | define('CI_PHPUNIT_TESTPATH', dirname(__FILE__).DIRECTORY_SEPARATOR); |
29 | 29 | } |
30 | 30 | |
@@ -41,38 +41,38 @@ discard block |
||
41 | 41 | $cwd_backup = getcwd(); |
42 | 42 | |
43 | 43 | // Load autoloader for ci-phpunit-test |
44 | - require __DIR__ . '/autoloader.php'; |
|
44 | + require __DIR__.'/autoloader.php'; |
|
45 | 45 | |
46 | - require TESTPATH . 'TestCase.php'; |
|
46 | + require TESTPATH.'TestCase.php'; |
|
47 | 47 | |
48 | - $db_test_case_file = TESTPATH . 'DbTestCase.php'; |
|
48 | + $db_test_case_file = TESTPATH.'DbTestCase.php'; |
|
49 | 49 | if (is_readable($db_test_case_file)) |
50 | 50 | { |
51 | 51 | require $db_test_case_file; |
52 | 52 | } |
53 | 53 | |
54 | - $unit_test_case_file = TESTPATH . 'UnitTestCase.php'; |
|
54 | + $unit_test_case_file = TESTPATH.'UnitTestCase.php'; |
|
55 | 55 | if (is_readable($unit_test_case_file)) |
56 | 56 | { |
57 | 57 | require $unit_test_case_file; |
58 | 58 | } |
59 | 59 | |
60 | 60 | // Replace a few Common functions |
61 | - require __DIR__ . '/replacing/core/Common.php'; |
|
62 | - require BASEPATH . 'core/Common.php'; |
|
61 | + require __DIR__.'/replacing/core/Common.php'; |
|
62 | + require BASEPATH.'core/Common.php'; |
|
63 | 63 | |
64 | 64 | // Workaround for missing CodeIgniter's error handler |
65 | 65 | // See https://github.com/kenjis/ci-phpunit-test/issues/37 |
66 | 66 | set_error_handler('_error_handler'); |
67 | 67 | |
68 | 68 | // Load new functions of CIPHPUnitTest |
69 | - require __DIR__ . '/functions.php'; |
|
69 | + require __DIR__.'/functions.php'; |
|
70 | 70 | // Load ci-phpunit-test CI_Loader |
71 | - require __DIR__ . '/replacing/core/Loader.php'; |
|
71 | + require __DIR__.'/replacing/core/Loader.php'; |
|
72 | 72 | // Load ci-phpunit-test CI_Input |
73 | - require __DIR__ . '/replacing/core/Input.php'; |
|
73 | + require __DIR__.'/replacing/core/Input.php'; |
|
74 | 74 | // Load ci-phpunit-test CI_Output |
75 | - require __DIR__ . '/replacing/core/Output.php'; |
|
75 | + require __DIR__.'/replacing/core/Output.php'; |
|
76 | 76 | |
77 | 77 | // Change current directory |
78 | 78 | chdir(FCPATH); |
@@ -84,12 +84,12 @@ 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 | self::replaceHelpers(); |
90 | 90 | |
91 | 91 | // Create CodeIgniter instance |
92 | - if (! self::wiredesignzHmvcInstalled()) |
|
92 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
93 | 93 | { |
94 | 94 | new CI_Controller(); |
95 | 95 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | public static function createCodeIgniterInstance() |
112 | 112 | { |
113 | - if (! self::wiredesignzHmvcInstalled()) |
|
113 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
114 | 114 | { |
115 | 115 | new CI_Controller(); |
116 | 116 | } |
@@ -139,11 +139,11 @@ discard block |
||
139 | 139 | protected static function replaceLoader() |
140 | 140 | { |
141 | 141 | $my_loader_file = |
142 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php'; |
|
142 | + APPPATH.'core/'.config_item('subclass_prefix').'Loader.php'; |
|
143 | 143 | |
144 | 144 | if (file_exists($my_loader_file)) |
145 | 145 | { |
146 | - self::$loader_class = config_item('subclass_prefix') . 'Loader'; |
|
146 | + self::$loader_class = config_item('subclass_prefix').'Loader'; |
|
147 | 147 | if ( ! class_exists(self::$loader_class)) |
148 | 148 | { |
149 | 149 | require $my_loader_file; |
@@ -162,19 +162,19 @@ discard block |
||
162 | 162 | |
163 | 163 | protected static function loadHelper($helper) |
164 | 164 | { |
165 | - $my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . $helper . '.php'; |
|
165 | + $my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php'; |
|
166 | 166 | if (file_exists($my_helper_file)) |
167 | 167 | { |
168 | 168 | require $my_helper_file; |
169 | 169 | } |
170 | - require __DIR__ . '/replacing/helpers/' . $helper . '.php'; |
|
170 | + require __DIR__.'/replacing/helpers/'.$helper.'.php'; |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | public static function setPatcherCacheDir($dir = null) |
174 | 174 | { |
175 | 175 | if ($dir === null) |
176 | 176 | { |
177 | - $dir = CI_PHPUNIT_TESTPATH . 'tmp/cache'; |
|
177 | + $dir = CI_PHPUNIT_TESTPATH.'tmp/cache'; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | MonkeyPatchManager::setCacheDir( |