Skip to content

Commit 0bc144a

Browse files
committed
PrintProgress*Test: temporarily disable tests
... as they are incompatible with the STDOUT vs STDERR changes as made in PHPCS 4.0 in its current state.
1 parent 0de289b commit 0bc144a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tests/Core/Runner/PrintProgressDotsTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace PHP_CodeSniffer\Tests\Core\Runner;
1010

11+
use PHP_CodeSniffer\Config;
1112
use PHP_CodeSniffer\Files\DummyFile;
1213
use PHP_CodeSniffer\Ruleset;
1314
use PHP_CodeSniffer\Runner;
@@ -196,6 +197,12 @@ public static function dataProgressDotCbf()
196197
*/
197198
private function checkProgressDot($colors, $code, $sniffs, $expected, $enableFixer=false)
198199
{
200+
if (version_compare(Config::VERSION, '4.0', '>=') === true) {
201+
// This test is temporarily disabled on PHPCS 4.x as the stdOut/stdErr handling needs
202+
// a rewrite, as, as things are, it makes testing impossible.
203+
$this->markTestSkipped('This test is incompatible with PHPCS 4.0 (for now)');
204+
}
205+
199206
$this->expectOutputString($expected);
200207

201208
$config = new ConfigDouble(['-p']);

tests/Core/Runner/PrintProgressTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace PHP_CodeSniffer\Tests\Core\Runner;
1010

11+
use PHP_CodeSniffer\Config;
1112
use PHP_CodeSniffer\Files\DummyFile;
1213
use PHP_CodeSniffer\Ruleset;
1314
use PHP_CodeSniffer\Runner;
@@ -116,6 +117,12 @@ public static function reset()
116117
*/
117118
public function testNoProgressIsShownWhenDisabled()
118119
{
120+
if (version_compare(Config::VERSION, '4.0', '>=') === true) {
121+
// This test is temporarily disabled on PHPCS 4.x as the stdOut/stdErr handling needs
122+
// a rewrite, as, as things are, it makes testing impossible.
123+
$this->markTestSkipped('This test is incompatible with PHPCS 4.0 (for now)');
124+
}
125+
119126
$this->expectOutputString('');
120127

121128
self::$config->showProgress = false;
@@ -134,6 +141,12 @@ public function testNoProgressIsShownWhenDisabled()
134141
*/
135142
public function testProgressDotSkippedFiles()
136143
{
144+
if (version_compare(Config::VERSION, '4.0', '>=') === true) {
145+
// This test is temporarily disabled on PHPCS 4.x as the stdOut/stdErr handling needs
146+
// a rewrite, as, as things are, it makes testing impossible.
147+
$this->markTestSkipped('This test is incompatible with PHPCS 4.0 (for now)');
148+
}
149+
137150
$nrOfFiles = 10;
138151
$this->expectOutputString('.S.S.S.S.S 10 / 10 (100%)'.PHP_EOL);
139152

@@ -162,6 +175,12 @@ public function testProgressDotSkippedFiles()
162175
*/
163176
public function testEndOfLineSummary($nrOfFiles, $expected)
164177
{
178+
if (version_compare(Config::VERSION, '4.0', '>=') === true) {
179+
// This test is temporarily disabled on PHPCS 4.x as the stdOut/stdErr handling needs
180+
// a rewrite, as, as things are, it makes testing impossible.
181+
$this->markTestSkipped('This test is incompatible with PHPCS 4.0 (for now)');
182+
}
183+
165184
$this->expectOutputString($expected);
166185

167186
for ($i = 1; $i <= $nrOfFiles; $i++) {

0 commit comments

Comments
 (0)