Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions tests/Core/AbstractMethodTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
namespace PHP_CodeSniffer\Tests\Core;

use Exception;
use PHP_CodeSniffer\Files\DummyFile;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Files\LocalFile;
use PHP_CodeSniffer\Ruleset;
use PHP_CodeSniffer\Tests\ConfigDouble;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -58,11 +58,7 @@ public static function setUpBeforeClass(): void
$relativePath = str_replace('\\', DIRECTORY_SEPARATOR, $relativeCN);
$pathToTestFile = realpath(__DIR__).$relativePath.'.inc';

// 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 = new LocalFile($pathToTestFile, $ruleset, $config);
self::$phpcsFile->parse();

}//end setUpBeforeClass()
Expand Down
8 changes: 2 additions & 6 deletions tests/Core/Tokenizers/AbstractTokenizerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace PHP_CodeSniffer\Tests\Core\Tokenizers;

use PHP_CodeSniffer\Files\DummyFile;
use PHP_CodeSniffer\Files\LocalFile;
use PHP_CodeSniffer\Ruleset;
use PHP_CodeSniffer\Tests\ConfigDouble;
use PHP_CodeSniffer\Tests\Core\AbstractMethodTestCase;
Expand Down Expand Up @@ -63,11 +63,7 @@ protected function setUp(): void
$relativePath = str_replace('\\', DIRECTORY_SEPARATOR, $relativeCN);
$pathToTestFile = realpath(__DIR__).$relativePath.'.inc';

// Make sure the file gets parsed correctly based on the file type.
$contents = 'phpcs_input_file: '.$pathToTestFile.PHP_EOL;
$contents .= file_get_contents($pathToTestFile);

$this->phpcsFile = new DummyFile($contents, $ruleset, $config);
$this->phpcsFile = new LocalFile($pathToTestFile, $ruleset, $config);
$this->phpcsFile->parse();
}//end if

Expand Down
Loading