diff --git a/tests/Core/Tokenizer/HeredocNowdocCloserTest.php b/tests/Core/Tokenizer/HeredocNowdocCloserTest.php index 2902556a2e..987972ceb3 100644 --- a/tests/Core/Tokenizer/HeredocNowdocCloserTest.php +++ b/tests/Core/Tokenizer/HeredocNowdocCloserTest.php @@ -9,9 +9,6 @@ namespace PHP_CodeSniffer\Tests\Core\Tokenizer; -use PHP_CodeSniffer\Config; -use PHP_CodeSniffer\Ruleset; -use PHP_CodeSniffer\Files\DummyFile; use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; /** @@ -23,39 +20,6 @@ final class HeredocNowdocCloserTest extends AbstractMethodUnitTest { - /** - * Initialize & tokenize \PHP_CodeSniffer\Files\File with code from the test case file. - * - * {@internal This is a near duplicate of the original method. Only difference is that - * tab replacement is enabled for this test.} - * - * @beforeClass - * - * @return void - */ - public static function initializeFile() - { - $config = new Config(); - $config->standards = ['PSR1']; - $config->tabWidth = 4; - - $ruleset = new Ruleset($config); - - // Default to a file with the same name as the test class. Extension is property based. - $relativeCN = str_replace(__NAMESPACE__, '', get_called_class()); - $relativePath = str_replace('\\', DIRECTORY_SEPARATOR, $relativeCN); - $pathToTestFile = realpath(__DIR__).$relativePath.'.'.static::$fileExtension; - - // Make sure the file gets parsed correctly based on the file type. - $contents = 'phpcs_input_file: '.$pathToTestFile.PHP_EOL; - $contents .= file_get_contents($pathToTestFile); - - self::$phpcsFile = new DummyFile($contents, $ruleset, $config); - self::$phpcsFile->process(); - - }//end initializeFile() - - /** * Verify that leading (indent) whitespace in a heredoc/nowdoc closer token get the tab replacement treatment. *