Skip to content

Commit 45c61f5

Browse files
authored
Merge pull request #356 from PHPCSStandards/feature/tests-yet-another-stability-tweak
Tests: minor stability tweak
2 parents fa15cdd + 559d47e commit 45c61f5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/Core/AbstractMethodUnitTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ abstract class AbstractMethodUnitTest extends TestCase
5757
*/
5858
public static function initializeFile()
5959
{
60-
$config = new ConfigDouble();
60+
$_SERVER['argv'] = [];
61+
$config = new ConfigDouble();
6162
// Also set a tab-width to enable testing tab-replaced vs `orig_content`.
6263
$config->tabWidth = static::$tabWidth;
6364

tests/Core/Tokenizer/AbstractTokenizerTestCase.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ abstract class AbstractTokenizerTestCase extends TestCase
6262
protected function initializeFile()
6363
{
6464
if (isset($this->phpcsFile) === false) {
65-
$config = new ConfigDouble();
65+
$_SERVER['argv'] = [];
66+
$config = new ConfigDouble();
67+
6668
// Also set a tab-width to enable testing tab-replaced vs `orig_content`.
6769
$config->tabWidth = $this->tabWidth;
6870

@@ -79,7 +81,7 @@ protected function initializeFile()
7981

8082
$this->phpcsFile = new DummyFile($contents, $ruleset, $config);
8183
$this->phpcsFile->parse();
82-
}
84+
}//end if
8385

8486
}//end initializeFile()
8587

0 commit comments

Comments
 (0)