diff --git a/tests/Core/AbstractMethodUnitTest.php b/tests/Core/AbstractMethodUnitTest.php index 258f0b35fb..b933be17b4 100644 --- a/tests/Core/AbstractMethodUnitTest.php +++ b/tests/Core/AbstractMethodUnitTest.php @@ -57,7 +57,8 @@ abstract class AbstractMethodUnitTest extends TestCase */ public static function initializeFile() { - $config = new ConfigDouble(); + $_SERVER['argv'] = []; + $config = new ConfigDouble(); // Also set a tab-width to enable testing tab-replaced vs `orig_content`. $config->tabWidth = static::$tabWidth; diff --git a/tests/Core/Tokenizer/AbstractTokenizerTestCase.php b/tests/Core/Tokenizer/AbstractTokenizerTestCase.php index c9e09c07d4..0f829182ba 100644 --- a/tests/Core/Tokenizer/AbstractTokenizerTestCase.php +++ b/tests/Core/Tokenizer/AbstractTokenizerTestCase.php @@ -62,7 +62,9 @@ abstract class AbstractTokenizerTestCase extends TestCase protected function initializeFile() { if (isset($this->phpcsFile) === false) { - $config = new ConfigDouble(); + $_SERVER['argv'] = []; + $config = new ConfigDouble(); + // Also set a tab-width to enable testing tab-replaced vs `orig_content`. $config->tabWidth = $this->tabWidth; @@ -79,7 +81,7 @@ protected function initializeFile() $this->phpcsFile = new DummyFile($contents, $ruleset, $config); $this->phpcsFile->parse(); - } + }//end if }//end initializeFile()