@@ -33,35 +33,35 @@ discard block |
||
33 | 33 | $cwd_backup = getcwd(); |
34 | 34 | |
35 | 35 | // Load autoloader for ci-phpunit-test |
36 | - require __DIR__ . '/autoloader.php'; |
|
36 | + require __DIR__.'/autoloader.php'; |
|
37 | 37 | |
38 | 38 | // Autoloader for PHP-Parser |
39 | 39 | // Don't use `require`, because we may have required already |
40 | 40 | // in `patcher/bootstrap.php` |
41 | - require_once __DIR__ . '/patcher/third_party/PHP-Parser/lib/bootstrap.php'; |
|
41 | + require_once __DIR__.'/patcher/third_party/PHP-Parser/lib/bootstrap.php'; |
|
42 | 42 | |
43 | - require APPPATH . '/tests/TestCase.php'; |
|
43 | + require APPPATH.'/tests/TestCase.php'; |
|
44 | 44 | |
45 | - $db_test_case_file = APPPATH . '/tests/DbTestCase.php'; |
|
45 | + $db_test_case_file = APPPATH.'/tests/DbTestCase.php'; |
|
46 | 46 | if (is_readable($db_test_case_file)) |
47 | 47 | { |
48 | 48 | require $db_test_case_file; |
49 | 49 | } |
50 | 50 | |
51 | 51 | // Replace a few Common functions |
52 | - require __DIR__ . '/replacing/core/Common.php'; |
|
53 | - require BASEPATH . 'core/Common.php'; |
|
52 | + require __DIR__.'/replacing/core/Common.php'; |
|
53 | + require BASEPATH.'core/Common.php'; |
|
54 | 54 | |
55 | 55 | // Workaround for missing CodeIgniter's error handler |
56 | 56 | // See https://github.com/kenjis/ci-phpunit-test/issues/37 |
57 | 57 | set_error_handler('_error_handler'); |
58 | 58 | |
59 | 59 | // Load new functions of CIPHPUnitTest |
60 | - require __DIR__ . '/functions.php'; |
|
60 | + require __DIR__.'/functions.php'; |
|
61 | 61 | // Load ci-phpunit-test CI_Loader |
62 | - require __DIR__ . '/replacing/core/Loader.php'; |
|
62 | + require __DIR__.'/replacing/core/Loader.php'; |
|
63 | 63 | // Load ci-phpunit-test CI_Input |
64 | - require __DIR__ . '/replacing/core/Input.php'; |
|
64 | + require __DIR__.'/replacing/core/Input.php'; |
|
65 | 65 | |
66 | 66 | // Change current directroy |
67 | 67 | chdir(FCPATH); |
@@ -73,12 +73,12 @@ discard block |
||
73 | 73 | * |
74 | 74 | * And away we go... |
75 | 75 | */ |
76 | - require __DIR__ . '/replacing/core/CodeIgniter.php'; |
|
76 | + require __DIR__.'/replacing/core/CodeIgniter.php'; |
|
77 | 77 | |
78 | 78 | self::replaceHelpers(); |
79 | 79 | |
80 | 80 | // Create CodeIgniter instance |
81 | - if (! self::wiredesignzHmvcInstalled()) |
|
81 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
82 | 82 | { |
83 | 83 | new CI_Controller(); |
84 | 84 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | public static function createCodeIgniterInstance() |
101 | 101 | { |
102 | - if (! self::wiredesignzHmvcInstalled()) |
|
102 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
103 | 103 | { |
104 | 104 | new CI_Controller(); |
105 | 105 | } |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | protected static function replaceLoader() |
129 | 129 | { |
130 | 130 | $my_loader_file = |
131 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php'; |
|
131 | + APPPATH.'core/'.config_item('subclass_prefix').'Loader.php'; |
|
132 | 132 | |
133 | 133 | if (file_exists($my_loader_file)) |
134 | 134 | { |
135 | - self::$loader_class = config_item('subclass_prefix') . 'Loader'; |
|
135 | + self::$loader_class = config_item('subclass_prefix').'Loader'; |
|
136 | 136 | if ( ! class_exists(self::$loader_class)) |
137 | 137 | { |
138 | 138 | require $my_loader_file; |
@@ -143,19 +143,19 @@ discard block |
||
143 | 143 | |
144 | 144 | protected static function replaceHelpers() |
145 | 145 | { |
146 | - $my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . 'url_helper.php'; |
|
146 | + $my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').'url_helper.php'; |
|
147 | 147 | if (file_exists($my_helper_file)) |
148 | 148 | { |
149 | 149 | require $my_helper_file; |
150 | 150 | } |
151 | - require __DIR__ . '/replacing/helpers/url_helper.php'; |
|
151 | + require __DIR__.'/replacing/helpers/url_helper.php'; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | public static function setPatcherCacheDir($dir = null) |
155 | 155 | { |
156 | 156 | if ($dir === null) |
157 | 157 | { |
158 | - $dir = APPPATH . 'tests/_ci_phpunit_test/tmp/cache'; |
|
158 | + $dir = APPPATH.'tests/_ci_phpunit_test/tmp/cache'; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | MonkeyPatchManager::setCacheDir( |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | public function __construct() |
19 | 19 | { |
20 | - $this->CI =& get_instance(); |
|
20 | + $this->CI = & get_instance(); |
|
21 | 21 | $this->CI->load->database(); |
22 | 22 | $this->CI->load->dbforge(); |
23 | 23 | $this->db = $this->CI->db; |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | { |
34 | 34 | if ($this->seedPath === null) |
35 | 35 | { |
36 | - $this->seedPath = APPPATH . 'database/seeds/'; |
|
36 | + $this->seedPath = APPPATH.'database/seeds/'; |
|
37 | 37 | } |
38 | 38 | |
39 | - $file = $this->seedPath . $seeder . '.php'; |
|
39 | + $file = $this->seedPath.$seeder.'.php'; |
|
40 | 40 | require_once $file; |
41 | 41 | |
42 | 42 | $obj = new $seeder; |
@@ -49,7 +49,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |