@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | if ($this->db === null) |
| 37 | 37 | { |
| 38 | - $CI =& get_instance(); |
|
| 38 | + $CI = & get_instance(); |
|
| 39 | 39 | $CI->load->database(); |
| 40 | 40 | $this->db = $CI->db; |
| 41 | 41 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | protected function tearDown() |
| 56 | 56 | { |
| 57 | - if (! empty($this->insertCache)) |
|
| 57 | + if ( ! empty($this->insertCache)) |
|
| 58 | 58 | { |
| 59 | 59 | foreach ($this->insertCache as $row) |
| 60 | 60 | { |
@@ -33,30 +33,30 @@ 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'; |
|
| 44 | - require APPPATH . '/tests/DbTestCase.php'; |
|
| 43 | + require APPPATH.'/tests/TestCase.php'; |
|
| 44 | + require APPPATH.'/tests/DbTestCase.php'; |
|
| 45 | 45 | |
| 46 | 46 | // Replace a few Common functions |
| 47 | - require __DIR__ . '/replacing/core/Common.php'; |
|
| 48 | - require BASEPATH . 'core/Common.php'; |
|
| 47 | + require __DIR__.'/replacing/core/Common.php'; |
|
| 48 | + require BASEPATH.'core/Common.php'; |
|
| 49 | 49 | |
| 50 | 50 | // Workaround for missing CodeIgniter's error handler |
| 51 | 51 | // See https://github.com/kenjis/ci-phpunit-test/issues/37 |
| 52 | 52 | set_error_handler('_error_handler'); |
| 53 | 53 | |
| 54 | 54 | // Load new functions of CIPHPUnitTest |
| 55 | - require __DIR__ . '/functions.php'; |
|
| 55 | + require __DIR__.'/functions.php'; |
|
| 56 | 56 | // Load ci-phpunit-test CI_Loader |
| 57 | - require __DIR__ . '/replacing/core/Loader.php'; |
|
| 57 | + require __DIR__.'/replacing/core/Loader.php'; |
|
| 58 | 58 | // Load ci-phpunit-test CI_Input |
| 59 | - require __DIR__ . '/replacing/core/Input.php'; |
|
| 59 | + require __DIR__.'/replacing/core/Input.php'; |
|
| 60 | 60 | |
| 61 | 61 | // Change current directroy |
| 62 | 62 | chdir(FCPATH); |
@@ -68,12 +68,12 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * And away we go... |
| 70 | 70 | */ |
| 71 | - require __DIR__ . '/replacing/core/CodeIgniter.php'; |
|
| 71 | + require __DIR__.'/replacing/core/CodeIgniter.php'; |
|
| 72 | 72 | |
| 73 | 73 | self::replaceHelpers(); |
| 74 | 74 | |
| 75 | 75 | // Create CodeIgniter instance |
| 76 | - if (! self::wiredesignzHmvcInstalled()) |
|
| 76 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
| 77 | 77 | { |
| 78 | 78 | new CI_Controller(); |
| 79 | 79 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | public static function createCodeIgniterInstance() |
| 96 | 96 | { |
| 97 | - if (! self::wiredesignzHmvcInstalled()) |
|
| 97 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
| 98 | 98 | { |
| 99 | 99 | new CI_Controller(); |
| 100 | 100 | } |
@@ -123,11 +123,11 @@ discard block |
||
| 123 | 123 | protected static function replaceLoader() |
| 124 | 124 | { |
| 125 | 125 | $my_loader_file = |
| 126 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php'; |
|
| 126 | + APPPATH.'core/'.config_item('subclass_prefix').'Loader.php'; |
|
| 127 | 127 | |
| 128 | 128 | if (file_exists($my_loader_file)) |
| 129 | 129 | { |
| 130 | - self::$loader_class = config_item('subclass_prefix') . 'Loader'; |
|
| 130 | + self::$loader_class = config_item('subclass_prefix').'Loader'; |
|
| 131 | 131 | if ( ! class_exists(self::$loader_class)) |
| 132 | 132 | { |
| 133 | 133 | require $my_loader_file; |
@@ -138,19 +138,19 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | protected static function replaceHelpers() |
| 140 | 140 | { |
| 141 | - $my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . 'url_helper.php'; |
|
| 141 | + $my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').'url_helper.php'; |
|
| 142 | 142 | if (file_exists($my_helper_file)) |
| 143 | 143 | { |
| 144 | 144 | require $my_helper_file; |
| 145 | 145 | } |
| 146 | - require __DIR__ . '/replacing/helpers/url_helper.php'; |
|
| 146 | + require __DIR__.'/replacing/helpers/url_helper.php'; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | public static function setPatcherCacheDir($dir = null) |
| 150 | 150 | { |
| 151 | 151 | if ($dir === null) |
| 152 | 152 | { |
| 153 | - $dir = APPPATH . 'tests/_ci_phpunit_test/tmp/cache'; |
|
| 153 | + $dir = APPPATH.'tests/_ci_phpunit_test/tmp/cache'; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | MonkeyPatchManager::setCacheDir( |