@@ -38,8 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $patched = true; |
40 | 40 | $new_source = static::generateNewSource($source); |
41 | - } |
|
42 | - else |
|
41 | + } else |
|
43 | 42 | { |
44 | 43 | $new_source = $source; |
45 | 44 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | is_loaded('', TRUE); |
30 | 30 | |
31 | 31 | // Close db connection |
32 | - $CI =& get_instance(); |
|
32 | + $CI = & get_instance(); |
|
33 | 33 | if (isset($CI->db)) |
34 | 34 | { |
35 | 35 | if ( |
@@ -49,25 +49,25 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | // Load core classes |
52 | - $BM =& load_class('Benchmark', 'core'); |
|
52 | + $BM = & load_class('Benchmark', 'core'); |
|
53 | 53 | CIPHPUnitTestSuperGlobal::set_Global('BM', $BM); |
54 | - $EXT =& load_class('Hooks', 'core'); |
|
54 | + $EXT = & load_class('Hooks', 'core'); |
|
55 | 55 | CIPHPUnitTestSuperGlobal::set_Global('EXT', $EXT); |
56 | - $CFG =& load_class('Config', 'core'); |
|
56 | + $CFG = & load_class('Config', 'core'); |
|
57 | 57 | CIPHPUnitTestSuperGlobal::set_Global('CFG', $CFG); |
58 | - $UNI =& load_class('URI', 'core'); |
|
58 | + $UNI = & load_class('URI', 'core'); |
|
59 | 59 | CIPHPUnitTestSuperGlobal::set_Global('UNI', $UNI); |
60 | 60 | // $URI =& load_class('Utf8', 'core'); |
61 | 61 | // CIPHPUnitTestSuperGlobal::set_Global('URI', $URI); |
62 | - $RTR =& load_class('Router', 'core'); |
|
62 | + $RTR = & load_class('Router', 'core'); |
|
63 | 63 | CIPHPUnitTestSuperGlobal::set_Global('RTR', $RTR); |
64 | - $OUT =& load_class('Output', 'core'); |
|
64 | + $OUT = & load_class('Output', 'core'); |
|
65 | 65 | CIPHPUnitTestSuperGlobal::set_Global('OUT', $OUT); |
66 | - $SEC =& load_class('Security', 'core'); |
|
66 | + $SEC = & load_class('Security', 'core'); |
|
67 | 67 | CIPHPUnitTestSuperGlobal::set_Global('SEC', $SEC); |
68 | - $IN =& load_class('Input', 'core'); |
|
68 | + $IN = & load_class('Input', 'core'); |
|
69 | 69 | CIPHPUnitTestSuperGlobal::set_Global('IN', $IN); |
70 | - $LANG =& load_class('Lang', 'core'); |
|
70 | + $LANG = & load_class('Lang', 'core'); |
|
71 | 71 | CIPHPUnitTestSuperGlobal::set_Global('LANG', $LANG); |
72 | 72 | |
73 | 73 | CIPHPUnitTest::loadLoader(); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Part of CI PHPUnit Test |
|
4 | - * |
|
5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
6 | - * @license MIT License |
|
7 | - * @copyright 2015 Kenji Suzuki |
|
8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
9 | - */ |
|
3 | + * Part of CI PHPUnit Test |
|
4 | + * |
|
5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
6 | + * @license MIT License |
|
7 | + * @copyright 2015 Kenji Suzuki |
|
8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | require __DIR__ . '/Installer.php'; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Part of CI PHPUnit Test |
|
4 | - * |
|
5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
6 | - * @license MIT License |
|
7 | - * @copyright 2015 Kenji Suzuki |
|
8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
9 | - */ |
|
3 | + * Part of CI PHPUnit Test |
|
4 | + * |
|
5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
6 | + * @license MIT License |
|
7 | + * @copyright 2015 Kenji Suzuki |
|
8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | require __DIR__ . '/Installer.php'; |
12 | 12 |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Test Suite Provider for NetBeans |
|
4 | - * https://github.com/BrickieToolShed/netbeans-phpunit-support |
|
5 | - * |
|
6 | - * Modified 2015 by Kenji Suzuki <https://github.com/kenjis> |
|
7 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
8 | - */ |
|
3 | + * Test Suite Provider for NetBeans |
|
4 | + * https://github.com/BrickieToolShed/netbeans-phpunit-support |
|
5 | + * |
|
6 | + * Modified 2015 by Kenji Suzuki <https://github.com/kenjis> |
|
7 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ |
11 | 11 | /** |
@@ -52,71 +52,71 @@ discard block |
||
52 | 52 | */ |
53 | 53 | final class TestSuiteProvider |
54 | 54 | { |
55 | - /** |
|
56 | - * phpunit configuration file |
|
57 | - * |
|
58 | - * @var string |
|
59 | - */ |
|
60 | - private static $file; |
|
55 | + /** |
|
56 | + * phpunit configuration file |
|
57 | + * |
|
58 | + * @var string |
|
59 | + */ |
|
60 | + private static $file; |
|
61 | 61 | |
62 | - /** |
|
63 | - * constructor |
|
64 | - */ |
|
65 | - private function __construct() {} |
|
62 | + /** |
|
63 | + * constructor |
|
64 | + */ |
|
65 | + private function __construct() {} |
|
66 | 66 | |
67 | - /** |
|
68 | - * set the phpunit configuration file |
|
69 | - * |
|
70 | - * @param string $file the path or filename of the phunit configuration file |
|
71 | - */ |
|
72 | - public static function setConfigurationFile($file) |
|
73 | - { |
|
74 | - static::$file = $file; |
|
75 | - } |
|
67 | + /** |
|
68 | + * set the phpunit configuration file |
|
69 | + * |
|
70 | + * @param string $file the path or filename of the phunit configuration file |
|
71 | + */ |
|
72 | + public static function setConfigurationFile($file) |
|
73 | + { |
|
74 | + static::$file = $file; |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * get the phpunit test suite instance |
|
79 | - * |
|
80 | - * @return PHPUnit_Framework_TestSuite returns the phpunit test suite instance |
|
81 | - * @throws FileNotFoundException if the file is not found |
|
82 | - */ |
|
83 | - public static function suite() |
|
84 | - { |
|
85 | - $file = static::checkConfigurationFile( |
|
86 | - static::getConfigurationFile() |
|
87 | - ); |
|
77 | + /** |
|
78 | + * get the phpunit test suite instance |
|
79 | + * |
|
80 | + * @return PHPUnit_Framework_TestSuite returns the phpunit test suite instance |
|
81 | + * @throws FileNotFoundException if the file is not found |
|
82 | + */ |
|
83 | + public static function suite() |
|
84 | + { |
|
85 | + $file = static::checkConfigurationFile( |
|
86 | + static::getConfigurationFile() |
|
87 | + ); |
|
88 | 88 | |
89 | - return PHPUnit_Util_Configuration::getInstance($file) |
|
90 | - ->getTestSuiteConfiguration(); |
|
91 | - } |
|
89 | + return PHPUnit_Util_Configuration::getInstance($file) |
|
90 | + ->getTestSuiteConfiguration(); |
|
91 | + } |
|
92 | 92 | |
93 | - /** |
|
94 | - * get the phpunit configuration file |
|
95 | - * |
|
96 | - * @return string |
|
97 | - */ |
|
98 | - private static function getConfigurationFile() |
|
99 | - { |
|
100 | - static::$file = isset(static::$file) |
|
101 | - ? static::$file |
|
102 | - : APPPATH.'tests/phpunit.xml'; |
|
93 | + /** |
|
94 | + * get the phpunit configuration file |
|
95 | + * |
|
96 | + * @return string |
|
97 | + */ |
|
98 | + private static function getConfigurationFile() |
|
99 | + { |
|
100 | + static::$file = isset(static::$file) |
|
101 | + ? static::$file |
|
102 | + : APPPATH.'tests/phpunit.xml'; |
|
103 | 103 | |
104 | - return static::$file; |
|
105 | - } |
|
104 | + return static::$file; |
|
105 | + } |
|
106 | 106 | |
107 | - /** |
|
108 | - * check the given file |
|
109 | - * |
|
110 | - * @param string $file file to check |
|
111 | - * @return string returns the file if it is valid |
|
112 | - * @throws FileNotFoundException if the file is not found |
|
113 | - */ |
|
114 | - private static function checkConfigurationFile($file) |
|
115 | - { |
|
116 | - if (!file_exists($file)) { |
|
117 | - throw new \RuntimeException("The requested phpunit configuration was not found at $file"); |
|
118 | - } |
|
107 | + /** |
|
108 | + * check the given file |
|
109 | + * |
|
110 | + * @param string $file file to check |
|
111 | + * @return string returns the file if it is valid |
|
112 | + * @throws FileNotFoundException if the file is not found |
|
113 | + */ |
|
114 | + private static function checkConfigurationFile($file) |
|
115 | + { |
|
116 | + if (!file_exists($file)) { |
|
117 | + throw new \RuntimeException("The requested phpunit configuration was not found at $file"); |
|
118 | + } |
|
119 | 119 | |
120 | - return $file; |
|
121 | - } |
|
120 | + return $file; |
|
121 | + } |
|
122 | 122 | } |
@@ -113,7 +113,7 @@ |
||
113 | 113 | */ |
114 | 114 | private static function checkConfigurationFile($file) |
115 | 115 | { |
116 | - if (!file_exists($file)) { |
|
116 | + if ( ! file_exists($file)) { |
|
117 | 117 | throw new \RuntimeException("The requested phpunit configuration was not found at $file"); |
118 | 118 | } |
119 | 119 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Part of CI PHPUnit Test |
|
4 | - * |
|
5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
6 | - * @license MIT License |
|
7 | - * @copyright 2015 Kenji Suzuki |
|
8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
9 | - */ |
|
3 | + * Part of CI PHPUnit Test |
|
4 | + * |
|
5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
6 | + * @license MIT License |
|
7 | + * @copyright 2015 Kenji Suzuki |
|
8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | require __DIR__ . '/Installer.php'; |
12 | 12 |