Completed
Pull Request — master (#354)
by Kenji
02:25
created
application/tests/_ci_phpunit_test/replacing/helpers/download_helper.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			}
73 73
 
74 74
 			// Load the mime types
75
-			$mimes =& get_mimes();
75
+			$mimes = & get_mimes();
76 76
 
77 77
 			// Only change the default MIME if we can find one
78 78
 			if (isset($mimes[$extension]))
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		if (is_testing_env())
119 119
 		{
120
-			$CI =& get_instance();
120
+			$CI = & get_instance();
121 121
 			$CI->output->set_header('Content-Type: '.$mime);
122 122
 			$CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"');
123 123
 			$CI->output->set_header('Expires: 0');
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
 		if ($filename === '' OR $data === '')
39 39
 		{
40 40
 			return;
41
-		}
42
-		elseif ($data === NULL)
41
+		} elseif ($data === NULL)
43 42
 		{
44 43
 			if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE)
45 44
 			{
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
 			$filepath = $filename;
50 49
 			$filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename));
51 50
 			$filename = end($filename);
52
-		}
53
-		else
51
+		} else
54 52
 		{
55 53
 			$filesize = strlen($data);
56 54
 		}
@@ -137,8 +135,7 @@  discard block
 block discarded – undo
137 135
 			if ( ! is_testing_env())
138 136
 			{
139 137
 				exit($data);
140
-			}
141
-			else
138
+			} else
142 139
 			{
143 140
 				echo($data);
144 141
 				throw new CIPHPUnitTestExitException('exit() from force_download()');
@@ -155,8 +152,7 @@  discard block
 block discarded – undo
155 152
 		if ( ! is_testing_env())
156 153
 		{
157 154
 			exit;
158
-		}
159
-		else
155
+		} else
160 156
 		{
161 157
 			throw new CIPHPUnitTestExitException('exit() from force_download()');
162 158
 		}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,16 +34,14 @@  discard block
 block discarded – undo
34 34
 		if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE)
35 35
 		{
36 36
 			$method = 'refresh';
37
-		}
38
-		elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
37
+		} elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
39 38
 		{
40 39
 			if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
41 40
 			{
42 41
 				$code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
43 42
 					? 303	// reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
44 43
 					: 307;
45
-			}
46
-			else
44
+			} else
47 45
 			{
48 46
 				$code = 302;
49 47
 			}
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
 		if ( ! is_testing_env())
69 67
 		{
70 68
 			exit;
71
-		}
72
-		else
69
+		} else
73 70
 		{
74 71
 			while (ob_get_level() > 1)
75 72
 			{
Please login to merge, or discard this patch.
application/tests/Bootstrap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 // Define testing environment for ci-phpunit-test
58 58
 // This `if` statement is needed for @runInSeparateProcess
59
-if (! defined('ENVIRONMENT'))
59
+if ( ! defined('ENVIRONMENT'))
60 60
 {
61 61
 	define('ENVIRONMENT', 'testing');
62 62
 }
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
245 245
 
246 246
 	// Path to the test directory containing all the test files.
247
-	define('TESTPATH', __DIR__.DIRECTORY_SEPARATOR);  // Should be the folder this `Bootstrap.php` file is in.
247
+	define('TESTPATH', __DIR__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in.
248 248
 
249 249
 	// Path to the system directory
250 250
 	define('BASEPATH', $system_path);
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
 	define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR);
327 327
 
328 328
 	// Path to the ci-phpunit-test directory
329
-	if (is_file(TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR . 'CIPHPUnitTest.php'))
329
+	if (is_file(TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR.'CIPHPUnitTest.php'))
330 330
 	{
331
-		define('CI_PHPUNIT_TESTPATH', TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR);
331
+		define('CI_PHPUNIT_TESTPATH', TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR);
332 332
 	}
333 333
 	else
334 334
 	{
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
  * -------------------------------------------------------------------
390 390
  */
391 391
 
392
-require CI_PHPUNIT_TESTPATH . '/CIPHPUnitTest.php';
392
+require CI_PHPUNIT_TESTPATH.'/CIPHPUnitTest.php';
393 393
 
394 394
 CIPHPUnitTest::init();
395 395
 // Or you can set directories for autoloading
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/replacing/helpers/old/3.1.7-url_helper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,16 +34,14 @@  discard block
 block discarded – undo
34 34
 		if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE)
35 35
 		{
36 36
 			$method = 'refresh';
37
-		}
38
-		elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
37
+		} elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
39 38
 		{
40 39
 			if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
41 40
 			{
42 41
 				$code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
43 42
 					? 303	// reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
44 43
 					: 307;
45
-			}
46
-			else
44
+			} else
47 45
 			{
48 46
 				$code = 302;
49 47
 			}
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
 		if ( ! is_testing_env())
69 67
 		{
70 68
 			exit;
71
-		}
72
-		else
69
+		} else
73 70
 		{
74 71
 			while (ob_get_level() > 1)
75 72
 			{
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/replacing/helpers/old/3.1.9-url_helper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,16 +34,14 @@  discard block
 block discarded – undo
34 34
 		if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE)
35 35
 		{
36 36
 			$method = 'refresh';
37
-		}
38
-		elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
37
+		} elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
39 38
 		{
40 39
 			if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
41 40
 			{
42 41
 				$code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
43 42
 					? 303	// reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
44 43
 					: 307;
45
-			}
46
-			else
44
+			} else
47 45
 			{
48 46
 				$code = 302;
49 47
 			}
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
 		if ( ! is_testing_env())
69 67
 		{
70 68
 			exit;
71
-		}
72
-		else
69
+		} else
73 70
 		{
74 71
 			while (ob_get_level() > 1)
75 72
 			{
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/replacing/helpers/old/3.1.8-download_helper.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			}
73 73
 
74 74
 			// Load the mime types
75
-			$mimes =& get_mimes();
75
+			$mimes = & get_mimes();
76 76
 
77 77
 			// Only change the default MIME if we can find one
78 78
 			if (isset($mimes[$extension]))
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		if (is_testing_env())
119 119
 		{
120
-			$CI =& get_instance();
120
+			$CI = & get_instance();
121 121
 			$CI->output->set_header('Content-Type: '.$mime);
122 122
 			$CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"');
123 123
 			$CI->output->set_header('Expires: 0');
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
 		if ($filename === '' OR $data === '')
39 39
 		{
40 40
 			return;
41
-		}
42
-		elseif ($data === NULL)
41
+		} elseif ($data === NULL)
43 42
 		{
44 43
 			if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE)
45 44
 			{
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
 			$filepath = $filename;
50 49
 			$filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename));
51 50
 			$filename = end($filename);
52
-		}
53
-		else
51
+		} else
54 52
 		{
55 53
 			$filesize = strlen($data);
56 54
 		}
@@ -137,8 +135,7 @@  discard block
 block discarded – undo
137 135
 			if ( ! is_testing_env())
138 136
 			{
139 137
 				exit($data);
140
-			}
141
-			else
138
+			} else
142 139
 			{
143 140
 				echo($data);
144 141
 				throw new CIPHPUnitTestExitException('exit() from force_download()');
@@ -155,8 +152,7 @@  discard block
 block discarded – undo
155 152
 		if ( ! is_testing_env())
156 153
 		{
157 154
 			exit;
158
-		}
159
-		else
155
+		} else
160 156
 		{
161 157
 			throw new CIPHPUnitTestExitException('exit() from force_download()');
162 158
 		}
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/replacing/helpers/old/3.1.9-download_helper.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			}
73 73
 
74 74
 			// Load the mime types
75
-			$mimes =& get_mimes();
75
+			$mimes = & get_mimes();
76 76
 
77 77
 			// Only change the default MIME if we can find one
78 78
 			if (isset($mimes[$extension]))
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		if (is_testing_env())
119 119
 		{
120
-			$CI =& get_instance();
120
+			$CI = & get_instance();
121 121
 			$CI->output->set_header('Content-Type: '.$mime);
122 122
 			$CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"');
123 123
 			$CI->output->set_header('Expires: 0');
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
 		if ($filename === '' OR $data === '')
39 39
 		{
40 40
 			return;
41
-		}
42
-		elseif ($data === NULL)
41
+		} elseif ($data === NULL)
43 42
 		{
44 43
 			if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE)
45 44
 			{
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
 			$filepath = $filename;
50 49
 			$filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename));
51 50
 			$filename = end($filename);
52
-		}
53
-		else
51
+		} else
54 52
 		{
55 53
 			$filesize = strlen($data);
56 54
 		}
@@ -137,8 +135,7 @@  discard block
 block discarded – undo
137 135
 			if ( ! is_testing_env())
138 136
 			{
139 137
 				exit($data);
140
-			}
141
-			else
138
+			} else
142 139
 			{
143 140
 				echo($data);
144 141
 				throw new CIPHPUnitTestExitException('exit() from force_download()');
@@ -155,8 +152,7 @@  discard block
 block discarded – undo
155 152
 		if ( ! is_testing_env())
156 153
 		{
157 154
 			exit;
158
-		}
159
-		else
155
+		} else
160 156
 		{
161 157
 			throw new CIPHPUnitTestExitException('exit() from force_download()');
162 158
 		}
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/replacing/helpers/old/3.1.7-download_helper.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			}
73 73
 
74 74
 			// Load the mime types
75
-			$mimes =& get_mimes();
75
+			$mimes = & get_mimes();
76 76
 
77 77
 			// Only change the default MIME if we can find one
78 78
 			if (isset($mimes[$extension]))
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		if (is_testing_env())
119 119
 		{
120
-			$CI =& get_instance();
120
+			$CI = & get_instance();
121 121
 			$CI->output->set_header('Content-Type: '.$mime);
122 122
 			$CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"');
123 123
 			$CI->output->set_header('Expires: 0');
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
 		if ($filename === '' OR $data === '')
39 39
 		{
40 40
 			return;
41
-		}
42
-		elseif ($data === NULL)
41
+		} elseif ($data === NULL)
43 42
 		{
44 43
 			if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE)
45 44
 			{
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
 			$filepath = $filename;
50 49
 			$filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename));
51 50
 			$filename = end($filename);
52
-		}
53
-		else
51
+		} else
54 52
 		{
55 53
 			$filesize = strlen($data);
56 54
 		}
@@ -137,8 +135,7 @@  discard block
 block discarded – undo
137 135
 			if ( ! is_testing_env())
138 136
 			{
139 137
 				exit($data);
140
-			}
141
-			else
138
+			} else
142 139
 			{
143 140
 				echo($data);
144 141
 				throw new CIPHPUnitTestExitException('exit() from force_download()');
@@ -155,8 +152,7 @@  discard block
 block discarded – undo
155 152
 		if ( ! is_testing_env())
156 153
 		{
157 154
 			exit;
158
-		}
159
-		else
155
+		} else
160 156
 		{
161 157
 			throw new CIPHPUnitTestExitException('exit() from force_download()');
162 158
 		}
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/replacing/helpers/old/3.1.6-url_helper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,16 +34,14 @@  discard block
 block discarded – undo
34 34
 		if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE)
35 35
 		{
36 36
 			$method = 'refresh';
37
-		}
38
-		elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
37
+		} elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
39 38
 		{
40 39
 			if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
41 40
 			{
42 41
 				$code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
43 42
 					? 303	// reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
44 43
 					: 307;
45
-			}
46
-			else
44
+			} else
47 45
 			{
48 46
 				$code = 302;
49 47
 			}
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
 		if ( ! is_testing_env())
69 67
 		{
70 68
 			exit;
71
-		}
72
-		else
69
+		} else
73 70
 		{
74 71
 			while (ob_get_level() > 1)
75 72
 			{
Please login to merge, or discard this patch.