Completed
Pull Request — master (#274)
by
unknown
18:16
created
application/tests/Bootstrap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTest.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
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
-		if (!defined(CI_PHPUNIT_TESTPATH)) {
26
+		if ( ! defined(CI_PHPUNIT_TESTPATH)) {
27 27
 			define('CI_PHPUNIT_TESTPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
28 28
 		}
29 29
 
@@ -40,38 +40,38 @@  discard block
 block discarded – undo
40 40
 		$cwd_backup = getcwd();
41 41
 
42 42
 		// Load autoloader for ci-phpunit-test
43
-		require __DIR__ . '/autoloader.php';
43
+		require __DIR__.'/autoloader.php';
44 44
 
45
-		require TESTPATH . 'TestCase.php';
45
+		require TESTPATH.'TestCase.php';
46 46
 
47
-		$db_test_case_file = TESTPATH . 'DbTestCase.php';
47
+		$db_test_case_file = TESTPATH.'DbTestCase.php';
48 48
 		if (is_readable($db_test_case_file))
49 49
 		{
50 50
 			require $db_test_case_file;
51 51
 		}
52 52
 
53
-		$unit_test_case_file = TESTPATH . 'UnitTestCase.php';
53
+		$unit_test_case_file = TESTPATH.'UnitTestCase.php';
54 54
 		if (is_readable($unit_test_case_file))
55 55
 		{
56 56
 			require $unit_test_case_file;
57 57
 		}
58 58
 
59 59
 		// Replace a few Common functions
60
-		require __DIR__ . '/replacing/core/Common.php';
61
-		require BASEPATH . 'core/Common.php';
60
+		require __DIR__.'/replacing/core/Common.php';
61
+		require BASEPATH.'core/Common.php';
62 62
 
63 63
 		// Workaround for missing CodeIgniter's error handler
64 64
 		// See https://github.com/kenjis/ci-phpunit-test/issues/37
65 65
 		set_error_handler('_error_handler');
66 66
 
67 67
 		// Load new functions of CIPHPUnitTest
68
-		require __DIR__ . '/functions.php';
68
+		require __DIR__.'/functions.php';
69 69
 		// Load ci-phpunit-test CI_Loader
70
-		require __DIR__ . '/replacing/core/Loader.php';
70
+		require __DIR__.'/replacing/core/Loader.php';
71 71
 		// Load ci-phpunit-test CI_Input
72
-		require __DIR__ . '/replacing/core/Input.php';
72
+		require __DIR__.'/replacing/core/Input.php';
73 73
 		// Load ci-phpunit-test CI_Output
74
-		require __DIR__ . '/replacing/core/Output.php';
74
+		require __DIR__.'/replacing/core/Output.php';
75 75
 
76 76
 		// Change current directory
77 77
 		chdir(FCPATH);
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
 		 *
84 84
 		 * And away we go...
85 85
 		 */
86
-		require __DIR__ . '/replacing/core/CodeIgniter.php';
86
+		require __DIR__.'/replacing/core/CodeIgniter.php';
87 87
 
88 88
 		self::replaceHelpers();
89 89
 
90 90
 		// Create CodeIgniter instance
91
-		if (! self::wiredesignzHmvcInstalled())
91
+		if ( ! self::wiredesignzHmvcInstalled())
92 92
 		{
93 93
 			new CI_Controller();
94 94
 		}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 	public static function createCodeIgniterInstance()
111 111
 	{
112
-		if (! self::wiredesignzHmvcInstalled())
112
+		if ( ! self::wiredesignzHmvcInstalled())
113 113
 		{
114 114
 			new CI_Controller();
115 115
 		}
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
 	protected static function replaceLoader()
139 139
 	{
140 140
 		$my_loader_file =
141
-			APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php';
141
+			APPPATH.'core/'.config_item('subclass_prefix').'Loader.php';
142 142
 
143 143
 		if (file_exists($my_loader_file))
144 144
 		{
145
-			self::$loader_class = config_item('subclass_prefix') . 'Loader';
145
+			self::$loader_class = config_item('subclass_prefix').'Loader';
146 146
 			if ( ! class_exists(self::$loader_class))
147 147
 			{
148 148
 				require $my_loader_file;
@@ -161,19 +161,19 @@  discard block
 block discarded – undo
161 161
 
162 162
 	protected static function loadHelper($helper)
163 163
 	{
164
-		$my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . $helper . '.php';
164
+		$my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php';
165 165
 		if (file_exists($my_helper_file))
166 166
 		{
167 167
 			require $my_helper_file;
168 168
 		}
169
-		require __DIR__ . '/replacing/helpers/' . $helper . '.php';
169
+		require __DIR__.'/replacing/helpers/'.$helper.'.php';
170 170
 	}
171 171
 
172 172
 	public static function setPatcherCacheDir($dir = null)
173 173
 	{
174 174
 		if ($dir === null)
175 175
 		{
176
-			$dir = CI_PHPUNIT_TESTPATH . 'tmp/cache';
176
+			$dir = CI_PHPUNIT_TESTPATH.'tmp/cache';
177 177
 		}
178 178
 
179 179
 		MonkeyPatchManager::setCacheDir(
Please login to merge, or discard this patch.