Completed
Pull Request — master (#147)
by Kenji
03:55 queued 01:44
created
application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -75,19 +75,19 @@
 block discarded – undo
75 75
 		$this->CI =& get_instance();
76 76
 	}
77 77
 
78
-    /**
79
-     * Create a controller instance
80
-     *
81
-     * @param string $classname
82
-     * @return CI_Controller
83
-     */
84
-    public function newController($classname)
85
-    {
86
-        reset_instance();
87
-        $controller = new $classname;
88
-        $this->CI =& get_instance();
89
-        return $controller;
90
-    }
78
+	/**
79
+	 * Create a controller instance
80
+	 *
81
+	 * @param string $classname
82
+	 * @return CI_Controller
83
+	 */
84
+	public function newController($classname)
85
+	{
86
+		reset_instance();
87
+		$controller = new $classname;
88
+		$this->CI =& get_instance();
89
+		return $controller;
90
+	}
91 91
 
92 92
 	protected function tearDown()
93 93
 	{
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 			return $this->$name;
50 50
 		}
51 51
 
52
-		throw new LogicException('No such property: ' . $name);
52
+		throw new LogicException('No such property: '.$name);
53 53
 	}
54 54
 
55 55
 	public static function setUpBeforeClass()
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	{
73 73
 		reset_instance();
74 74
 		CIPHPUnitTest::createCodeIgniterInstance();
75
-		$this->CI =& get_instance();
75
+		$this->CI = & get_instance();
76 76
 	}
77 77
 
78 78
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         reset_instance();
87 87
         $controller = new $classname;
88
-        $this->CI =& get_instance();
88
+        $this->CI = & get_instance();
89 89
         return $controller;
90 90
     }
91 91
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		$this->assertSame(
267 267
 			$code,
268 268
 			$actual,
269
-			'Status code is not ' . $code . ' but ' . $actual . '.'
269
+			'Status code is not '.$code.' but '.$actual.'.'
270 270
 		);
271 271
 	}
272 272
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	 */
279 279
 	public function assertResponseHeader($name, $value)
280 280
 	{
281
-		$CI =& get_instance();
281
+		$CI = & get_instance();
282 282
 		$actual = $CI->output->get_header($name);
283 283
 
284 284
 		if ($actual === null)
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 	 */
303 303
 	public function assertResponseCookie($name, $value, $allow_duplicate = false)
304 304
 	{
305
-		$CI =& get_instance();
305
+		$CI = & get_instance();
306 306
 		$cookies = isset($CI->output->_cookies[$name])
307 307
 			? $CI->output->_cookies[$name] : null;
308 308
 
@@ -360,23 +360,23 @@  discard block
 block discarded – undo
360 360
 			$this->fail('redirect() is not called.');
361 361
 		}
362 362
 
363
-		if (! function_exists('site_url'))
363
+		if ( ! function_exists('site_url'))
364 364
 		{
365
-			$CI =& get_instance();
365
+			$CI = & get_instance();
366 366
 			$CI->load->helper('url');
367 367
 		}
368 368
 
369
-		if (! preg_match('#^(\w+:)?//#i', $uri))
369
+		if ( ! preg_match('#^(\w+:)?//#i', $uri))
370 370
 		{
371 371
 			$uri = site_url($uri);
372 372
 		}
373 373
 		$absolute_url = $uri;
374
-		$expected = 'Redirect to ' . $absolute_url;
374
+		$expected = 'Redirect to '.$absolute_url;
375 375
 
376 376
 		$this->assertSame(
377 377
 			$expected,
378 378
 			$status['redirect'],
379
-			'URL to redirect is not ' . $expected . ' but ' . $status['redirect'] . '.'
379
+			'URL to redirect is not '.$expected.' but '.$status['redirect'].'.'
380 380
 		);
381 381
 
382 382
 		if ($code !== null)
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 			$this->assertSame(
385 385
 				$code,
386 386
 				$status['code'],
387
-				'Status code is not ' . $code . ' but ' . $status['code'] . '.'
387
+				'Status code is not '.$code.' but '.$status['code'].'.'
388 388
 			);
389 389
 		}
390 390
 	}
Please login to merge, or discard this patch.