diff --git a/tests/FileManipulationTest.php b/tests/FileManipulationTest.php index fcc359618..5d490cfea 100644 --- a/tests/FileManipulationTest.php +++ b/tests/FileManipulationTest.php @@ -9,9 +9,6 @@ class FileManipulationTest extends TestCase /** @var \Psalm\Checker\ProjectChecker */ protected $project_checker; - /** @var TestConfig|null */ - private static $config; - /** * @return void */ @@ -21,17 +18,6 @@ class FileManipulationTest extends TestCase \Psalm\FileManipulation\FunctionDocblockManipulator::clearCache(); $this->file_provider = new Provider\FakeFileProvider(); - - if (!self::$config) { - self::$config = new TestConfig(); - self::$config->addPluginPath('examples/ClassUnqualifier.php'); - } - - $this->project_checker = new \Psalm\Checker\ProjectChecker( - self::$config, - $this->file_provider, - new Provider\FakeParserCacheProvider() - ); } /** @@ -58,6 +44,18 @@ class FileManipulationTest extends TestCase $this->markTestSkipped('Skipped due to a bug.'); } + $config = new TestConfig(); + + if (empty($issues_to_fix)) { + $config->addPluginPath('examples/ClassUnqualifier.php'); + } + + $this->project_checker = new \Psalm\Checker\ProjectChecker( + $config, + $this->file_provider, + new Provider\FakeParserCacheProvider() + ); + $context = new Context(); $file_path = self::$src_dir_path . 'somefile.php'; @@ -848,7 +846,6 @@ class FileManipulationTest extends TestCase ['PossiblyUndefinedGlobalVariable'], true, ], - 'useUnqualifierPlugin' => [ '