Completed
Pull Request — master (#235)
by Kenji
02:55
created
application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 // Support PHPUnit 6.0
12
-if (! class_exists('PHPUnit_Framework_TestCase'))
12
+if ( ! class_exists('PHPUnit_Framework_TestCase'))
13 13
 {
14 14
 	class_alias('PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase');
15 15
 }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			return $this->$name;
65 65
 		}
66 66
 
67
-		throw new LogicException('No such property: ' . $name);
67
+		throw new LogicException('No such property: '.$name);
68 68
 	}
69 69
 
70 70
 	public static function setUpBeforeClass()
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	{
88 88
 		reset_instance();
89 89
 		CIPHPUnitTest::createCodeIgniterInstance();
90
-		$this->CI =& get_instance();
90
+		$this->CI = & get_instance();
91 91
 	}
92 92
 
93 93
 	protected function tearDown()
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 		}
165 165
 
166 166
 		set_error_handler(
167
-			function ($errno, $errstr, $errfile, $errline) {
168
-				throw new RuntimeException($errstr . ' on line ' . $errline . ' in file ' . $errfile);
167
+			function($errno, $errstr, $errfile, $errline) {
168
+				throw new RuntimeException($errstr.' on line '.$errline.' in file '.$errfile);
169 169
 			}
170 170
 		);
171 171
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 		$this->assertSame(
303 303
 			$code,
304 304
 			$actual,
305
-			'Status code is not ' . $code . ' but ' . $actual . '.'
305
+			'Status code is not '.$code.' but '.$actual.'.'
306 306
 		);
307 307
 	}
308 308
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 	 */
315 315
 	public function assertResponseHeader($name, $value)
316 316
 	{
317
-		$CI =& get_instance();
317
+		$CI = & get_instance();
318 318
 		$actual = $CI->output->get_header($name);
319 319
 
320 320
 		if ($actual === null)
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	 */
339 339
 	public function assertResponseCookie($name, $value, $allow_duplicate = false)
340 340
 	{
341
-		$CI =& get_instance();
341
+		$CI = & get_instance();
342 342
 		$cookies = isset($CI->output->_cookies[$name])
343 343
 			? $CI->output->_cookies[$name] : null;
344 344
 
@@ -406,23 +406,23 @@  discard block
 block discarded – undo
406 406
 			$this->fail('redirect() is not called.');
407 407
 		}
408 408
 
409
-		if (! function_exists('site_url'))
409
+		if ( ! function_exists('site_url'))
410 410
 		{
411
-			$CI =& get_instance();
411
+			$CI = & get_instance();
412 412
 			$CI->load->helper('url');
413 413
 		}
414 414
 
415
-		if (! preg_match('#^(\w+:)?//#i', $uri))
415
+		if ( ! preg_match('#^(\w+:)?//#i', $uri))
416 416
 		{
417 417
 			$uri = site_url($uri);
418 418
 		}
419 419
 		$absolute_url = $uri;
420
-		$expected = 'Redirect to ' . $absolute_url;
420
+		$expected = 'Redirect to '.$absolute_url;
421 421
 
422 422
 		$this->assertSame(
423 423
 			$expected,
424 424
 			$status['redirect'],
425
-			'URL to redirect is not ' . $expected . ' but ' . $status['redirect'] . '.'
425
+			'URL to redirect is not '.$expected.' but '.$status['redirect'].'.'
426 426
 		);
427 427
 
428 428
 		if ($code !== null)
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 			$this->assertSame(
431 431
 				$code,
432 432
 				$status['code'],
433
-				'Status code is not ' . $code . ' but ' . $status['code'] . '.'
433
+				'Status code is not '.$code.' but '.$status['code'].'.'
434 434
 			);
435 435
 		}
436 436
 	}
Please login to merge, or discard this patch.