Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop FakeFileProvider from tests folder #6030

Merged
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
3 changes: 2 additions & 1 deletion tests/Config/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Psalm\Context;
use Psalm\Exception\ConfigException;
use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Internal\Scanner\FileScanner;
use Psalm\Tests\Config\Plugin\FileTypeSelfRegisteringPlugin;
Expand Down Expand Up @@ -53,7 +54,7 @@ public static function setUpBeforeClass() : void
public function setUp() : void
{
RuntimeCaches::clearAll();
$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

private function getProjectAnalyzerWithConfig(Config $config): \Psalm\Internal\Analyzer\ProjectAnalyzer
Expand Down
3 changes: 2 additions & 1 deletion tests/Config/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Psalm\Context;
use Psalm\FileSource;
use Psalm\Internal\IncludeCollector;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Plugin\EventHandler\AfterCodebasePopulatedInterface;
use Psalm\Plugin\EventHandler\AfterEveryFunctionCallAnalysisInterface;
Expand Down Expand Up @@ -56,7 +57,7 @@ public static function setUpBeforeClass() : void
public function setUp() : void
{
RuntimeCaches::clearAll();
$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

private function getProjectAnalyzerWithConfig(Config $config): \Psalm\Internal\Analyzer\ProjectAnalyzer
Expand Down
3 changes: 2 additions & 1 deletion tests/DocumentationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Psalm\Config;
use Psalm\Context;
use Psalm\DocComment;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;

Expand Down Expand Up @@ -125,7 +126,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$this->project_analyzer = new \Psalm\Internal\Analyzer\ProjectAnalyzer(
new TestConfig(),
Expand Down
3 changes: 2 additions & 1 deletion tests/FileManipulation/ClassConstantMoveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileManipulation;

use Psalm\Context;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/FileManipulation/ClassMoveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileManipulation;

use Psalm\Context;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/FileManipulation/FileManipulationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileManipulation;

use Psalm\Context;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/FileManipulation/MethodMoveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileManipulation;

use Psalm\Context;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/FileManipulation/NamespaceMoveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileManipulation;

use Psalm\Context;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/FileManipulation/PropertyMoveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileManipulation;

use Psalm\Context;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/FileReferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests;

use Psalm\Context;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;

Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
RuntimeCaches::clearAll();

$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$this->project_analyzer = new \Psalm\Internal\Analyzer\ProjectAnalyzer(
new TestConfig(),
Expand Down
3 changes: 2 additions & 1 deletion tests/FileUpdates/AnalyzedMethodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileUpdates;

use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -18,7 +19,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();

Expand Down
3 changes: 2 additions & 1 deletion tests/FileUpdates/CachedStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileUpdates;

use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -18,7 +19,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();

Expand Down
3 changes: 2 additions & 1 deletion tests/FileUpdates/ErrorAfterUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileUpdates;

use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -19,7 +20,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();

Expand Down
3 changes: 2 additions & 1 deletion tests/FileUpdates/ErrorFixTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileUpdates;

use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -18,7 +19,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();
$config->throw_exception = false;
Expand Down
3 changes: 2 additions & 1 deletion tests/FileUpdates/TemporaryUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Psalm\Tests\FileUpdates;

use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -20,7 +21,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();
$config->throw_exception = false;
Expand Down
7 changes: 0 additions & 7 deletions tests/Internal/Provider/FakeFileProvider.php

This file was deleted.

3 changes: 2 additions & 1 deletion tests/JsonOutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use Psalm\Context;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\IssueBuffer;
use Psalm\Tests\Internal\Provider;
Expand All @@ -16,7 +17,7 @@ public function setUp() : void
// `TestCase::setUp()` creates its own ProjectAnalyzer and Config instance, but we don't want to do that in this
// case, so don't run a `parent::setUp()` call here.
RuntimeCaches::clearAll();
$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();
$config->throw_exception = false;
Expand Down
3 changes: 2 additions & 1 deletion tests/LanguageServer/CompletionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use LanguageServerProtocol\Position;
use Psalm\Context;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -17,7 +18,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();

Expand Down
3 changes: 2 additions & 1 deletion tests/LanguageServer/FileMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use Psalm\Context;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -13,7 +14,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();

Expand Down
3 changes: 2 additions & 1 deletion tests/LanguageServer/SymbolLookupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Psalm\Context;
use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\TestConfig;
Expand All @@ -15,7 +16,7 @@ public function setUp() : void
{
parent::setUp();

$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();

Expand Down
3 changes: 2 additions & 1 deletion tests/ProjectCheckerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use Psalm\Config;
use Psalm\Internal\IncludeCollector;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Plugin\EventHandler\AfterCodebasePopulatedInterface;
use Psalm\Plugin\EventHandler\Event\AfterCodebasePopulatedEvent;
Expand Down Expand Up @@ -45,7 +46,7 @@ public static function setUpBeforeClass() : void
public function setUp() : void
{
RuntimeCaches::clearAll();
$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

private function getProjectAnalyzerWithConfig(Config $config): \Psalm\Internal\Analyzer\ProjectAnalyzer
Expand Down
3 changes: 2 additions & 1 deletion tests/ReportOutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use DOMDocument;
use Psalm\Context;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\IssueBuffer;
use Psalm\Report;
Expand All @@ -26,7 +27,7 @@ public function setUp() : void
// `TestCase::setUp()` creates its own ProjectAnalyzer and Config instance, but we don't want to do that in this
// case, so don't run a `parent::setUp()` call here.
RuntimeCaches::clearAll();
$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();

$config = new TestConfig();
$config->throw_exception = false;
Expand Down
3 changes: 2 additions & 1 deletion tests/StubTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Psalm\Config;
use Psalm\Context;
use Psalm\Internal\IncludeCollector;
use Psalm\Internal\Provider\FakeFileProvider;
use Psalm\Internal\RuntimeCaches;
use Psalm\Tests\Internal\Provider;

Expand Down Expand Up @@ -37,7 +38,7 @@ public static function setUpBeforeClass() : void
public function setUp() : void
{
RuntimeCaches::clearAll();
$this->file_provider = new Provider\FakeFileProvider();
$this->file_provider = new FakeFileProvider();
}

private function getProjectAnalyzerWithConfig(Config $config): \Psalm\Internal\Analyzer\ProjectAnalyzer
Expand Down
Loading