@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | use PHPUnit\Runner\Version; |
15 | 15 | |
16 | 16 | // PHPUnit Compat. |
17 | -if ( \class_exists('\PHPUnit_Framework_IncompleteTestError') ) { |
|
17 | +if (\class_exists('\PHPUnit_Framework_IncompleteTestError')) { |
|
18 | 18 | \class_alias( |
19 | 19 | '\PHPUnit_Framework_IncompleteTestError', |
20 | 20 | '\ConsoleHelpers\PHPUnitCompat\Framework\IncompleteTestError' |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | ); |
28 | 28 | } |
29 | 29 | |
30 | -if ( class_exists('\PHPUnit_Framework_SkippedTestError') ) { |
|
30 | +if (class_exists('\PHPUnit_Framework_SkippedTestError')) { |
|
31 | 31 | \class_alias('\PHPUnit_Framework_SkippedTestError', '\ConsoleHelpers\PHPUnitCompat\Framework\SkippedTestError'); |
32 | 32 | } |
33 | 33 | else { |
34 | 34 | \class_alias('\PHPUnit\Framework\SkippedTestError', '\ConsoleHelpers\PHPUnitCompat\Framework\SkippedTestError'); |
35 | 35 | } |
36 | 36 | |
37 | -if ( class_exists('\PHPUnit_Framework_TestSuite_DataProvider') ) { |
|
37 | +if (class_exists('\PHPUnit_Framework_TestSuite_DataProvider')) { |
|
38 | 38 | \class_alias( |
39 | 39 | '\PHPUnit_Framework_TestSuite_DataProvider', |
40 | 40 | '\ConsoleHelpers\PHPUnitCompat\Framework\DataProviderTestSuite' |
@@ -47,22 +47,22 @@ discard block |
||
47 | 47 | ); |
48 | 48 | } |
49 | 49 | |
50 | -if ( class_exists('\PHPUnit_Framework_TestResult') ) { |
|
50 | +if (class_exists('\PHPUnit_Framework_TestResult')) { |
|
51 | 51 | \class_alias('\PHPUnit_Framework_TestResult', '\ConsoleHelpers\PHPUnitCompat\Framework\TestResult'); |
52 | 52 | } |
53 | 53 | else { |
54 | 54 | \class_alias('\PHPUnit\Framework\TestResult', '\ConsoleHelpers\PHPUnitCompat\Framework\TestResult'); |
55 | 55 | } |
56 | 56 | |
57 | -if ( class_exists('\PHPUnit_Framework_Test') ) { |
|
57 | +if (class_exists('\PHPUnit_Framework_Test')) { |
|
58 | 58 | \class_alias('\PHPUnit_Framework_Test', '\ConsoleHelpers\PHPUnitCompat\Framework\Test'); |
59 | 59 | } |
60 | 60 | else { |
61 | 61 | \class_alias('\PHPUnit\Framework\Test', '\ConsoleHelpers\PHPUnitCompat\Framework\Test'); |
62 | 62 | } |
63 | 63 | |
64 | -if ( !\defined('PHPUNIT_COMPAT_RUNNER_VERSION') ) { |
|
65 | - if ( \class_exists('PHPUnit\Runner\Version') ) { |
|
64 | +if (!\defined('PHPUNIT_COMPAT_RUNNER_VERSION')) { |
|
65 | + if (\class_exists('PHPUnit\Runner\Version')) { |
|
66 | 66 | \define('PHPUNIT_COMPAT_RUNNER_VERSION', Version::id()); |
67 | 67 | } |
68 | 68 | else { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | // CodeCoverage Compat. |
74 | -if ( class_exists('\PHP_CodeCoverage') ) { |
|
74 | +if (class_exists('\PHP_CodeCoverage')) { |
|
75 | 75 | \class_alias('\PHP_CodeCoverage', '\ConsoleHelpers\CodeCoverageCompat\CodeCoverage'); |
76 | 76 | } |
77 | 77 | else { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | ); |
82 | 82 | } |
83 | 83 | |
84 | -if ( \interface_exists('\PHP_CodeCoverage_Driver') ) { |
|
84 | +if (\interface_exists('\PHP_CodeCoverage_Driver')) { |
|
85 | 85 | \class_alias('\PHP_CodeCoverage_Driver', '\ConsoleHelpers\CodeCoverageCompat\Driver\Driver'); |
86 | 86 | } |
87 | 87 | else { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ); |
92 | 92 | } |
93 | 93 | |
94 | -if ( class_exists('\PHP_CodeCoverage_Filter') ) { |
|
94 | +if (class_exists('\PHP_CodeCoverage_Filter')) { |
|
95 | 95 | \class_alias('\PHP_CodeCoverage_Filter', '\ConsoleHelpers\CodeCoverageCompat\Filter'); |
96 | 96 | } |
97 | 97 | else { |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | */ |
122 | 122 | protected function verifyMockeryExpectations() |
123 | 123 | { |
124 | - if ( !\class_exists('Mockery') ) { |
|
124 | + if (!\class_exists('Mockery')) { |
|
125 | 125 | return; |
126 | 126 | } |
127 | 127 | |
128 | 128 | // Add Mockery expectations to assertion count. |
129 | 129 | $container = \Mockery::getContainer(); |
130 | 130 | |
131 | - if ( $container !== null ) { |
|
131 | + if ($container !== null) { |
|
132 | 132 | $this->addToAssertionCount($container->mockery_getExpectationCount()); |
133 | 133 | } |
134 | 134 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | } |
140 | 140 | |
141 | -if ( version_compare(\PHPUNIT_COMPAT_RUNNER_VERSION, '6.0.0', '<') ) { |
|
141 | +if (version_compare(\PHPUNIT_COMPAT_RUNNER_VERSION, '6.0.0', '<')) { |
|
142 | 142 | require_once __DIR__ . '/AbstractTestCase5.php'; |
143 | 143 | } |
144 | 144 | else { |
@@ -19,8 +19,7 @@ discard block |
||
19 | 19 | '\PHPUnit_Framework_IncompleteTestError', |
20 | 20 | '\ConsoleHelpers\PHPUnitCompat\Framework\IncompleteTestError' |
21 | 21 | ); |
22 | -} |
|
23 | -else { |
|
22 | +} else { |
|
24 | 23 | \class_alias( |
25 | 24 | '\PHPUnit\Framework\IncompleteTestError', |
26 | 25 | '\ConsoleHelpers\PHPUnitCompat\Framework\IncompleteTestError' |
@@ -29,8 +28,7 @@ discard block |
||
29 | 28 | |
30 | 29 | if ( class_exists('\PHPUnit_Framework_SkippedTestError') ) { |
31 | 30 | \class_alias('\PHPUnit_Framework_SkippedTestError', '\ConsoleHelpers\PHPUnitCompat\Framework\SkippedTestError'); |
32 | -} |
|
33 | -else { |
|
31 | +} else { |
|
34 | 32 | \class_alias('\PHPUnit\Framework\SkippedTestError', '\ConsoleHelpers\PHPUnitCompat\Framework\SkippedTestError'); |
35 | 33 | } |
36 | 34 | |
@@ -39,8 +37,7 @@ discard block |
||
39 | 37 | '\PHPUnit_Framework_TestSuite_DataProvider', |
40 | 38 | '\ConsoleHelpers\PHPUnitCompat\Framework\DataProviderTestSuite' |
41 | 39 | ); |
42 | -} |
|
43 | -else { |
|
40 | +} else { |
|
44 | 41 | \class_alias( |
45 | 42 | '\PHPUnit\Framework\DataProviderTestSuite', |
46 | 43 | '\ConsoleHelpers\PHPUnitCompat\Framework\DataProviderTestSuite' |
@@ -49,23 +46,20 @@ discard block |
||
49 | 46 | |
50 | 47 | if ( class_exists('\PHPUnit_Framework_TestResult') ) { |
51 | 48 | \class_alias('\PHPUnit_Framework_TestResult', '\ConsoleHelpers\PHPUnitCompat\Framework\TestResult'); |
52 | -} |
|
53 | -else { |
|
49 | +} else { |
|
54 | 50 | \class_alias('\PHPUnit\Framework\TestResult', '\ConsoleHelpers\PHPUnitCompat\Framework\TestResult'); |
55 | 51 | } |
56 | 52 | |
57 | 53 | if ( class_exists('\PHPUnit_Framework_Test') ) { |
58 | 54 | \class_alias('\PHPUnit_Framework_Test', '\ConsoleHelpers\PHPUnitCompat\Framework\Test'); |
59 | -} |
|
60 | -else { |
|
55 | +} else { |
|
61 | 56 | \class_alias('\PHPUnit\Framework\Test', '\ConsoleHelpers\PHPUnitCompat\Framework\Test'); |
62 | 57 | } |
63 | 58 | |
64 | 59 | if ( !\defined('PHPUNIT_COMPAT_RUNNER_VERSION') ) { |
65 | 60 | if ( \class_exists('PHPUnit\Runner\Version') ) { |
66 | 61 | \define('PHPUNIT_COMPAT_RUNNER_VERSION', Version::id()); |
67 | - } |
|
68 | - else { |
|
62 | + } else { |
|
69 | 63 | \define('PHPUNIT_COMPAT_RUNNER_VERSION', \PHPUnit_Runner_Version::id()); |
70 | 64 | } |
71 | 65 | } |
@@ -73,8 +67,7 @@ discard block |
||
73 | 67 | // CodeCoverage Compat. |
74 | 68 | if ( class_exists('\PHP_CodeCoverage') ) { |
75 | 69 | \class_alias('\PHP_CodeCoverage', '\ConsoleHelpers\CodeCoverageCompat\CodeCoverage'); |
76 | -} |
|
77 | -else { |
|
70 | +} else { |
|
78 | 71 | \class_alias( |
79 | 72 | '\SebastianBergmann\CodeCoverage\CodeCoverage', |
80 | 73 | '\ConsoleHelpers\CodeCoverageCompat\CodeCoverage' |
@@ -83,8 +76,7 @@ discard block |
||
83 | 76 | |
84 | 77 | if ( \interface_exists('\PHP_CodeCoverage_Driver') ) { |
85 | 78 | \class_alias('\PHP_CodeCoverage_Driver', '\ConsoleHelpers\CodeCoverageCompat\Driver\Driver'); |
86 | -} |
|
87 | -else { |
|
79 | +} else { |
|
88 | 80 | \class_alias( |
89 | 81 | '\SebastianBergmann\CodeCoverage\Driver\Driver', |
90 | 82 | '\ConsoleHelpers\CodeCoverageCompat\Driver\Driver' |
@@ -93,8 +85,7 @@ discard block |
||
93 | 85 | |
94 | 86 | if ( class_exists('\PHP_CodeCoverage_Filter') ) { |
95 | 87 | \class_alias('\PHP_CodeCoverage_Filter', '\ConsoleHelpers\CodeCoverageCompat\Filter'); |
96 | -} |
|
97 | -else { |
|
88 | +} else { |
|
98 | 89 | \class_alias('\SebastianBergmann\CodeCoverage\Filter', '\ConsoleHelpers\CodeCoverageCompat\Filter'); |
99 | 90 | } |
100 | 91 | |
@@ -140,7 +131,6 @@ discard block |
||
140 | 131 | |
141 | 132 | if ( version_compare(\PHPUNIT_COMPAT_RUNNER_VERSION, '6.0.0', '<') ) { |
142 | 133 | require_once __DIR__ . '/AbstractTestCase5.php'; |
143 | -} |
|
144 | -else { |
|
134 | +} else { |
|
145 | 135 | require_once __DIR__ . '/AbstractTestCase7.php'; |
146 | 136 | } |