From a6755cc52338e8980a52af3794eef8700bbab278 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Thu, 7 Feb 2019 15:27:43 -0500 Subject: [PATCH] Fix default test versions to 7.3 --- tests/ConfigTest.php | 6 +++++- tests/DocumentationTest.php | 2 ++ tests/FileReferenceTest.php | 1 + tests/FileUpdates/AnalyzedMethodTest.php | 1 + tests/FileUpdates/CachedStorageTest.php | 1 + tests/FileUpdates/ErrorAfterUpdateTest.php | 1 + tests/FileUpdates/ErrorFixTest.php | 1 + tests/FileUpdates/TemporaryUpdateTest.php | 1 + tests/LanguageServer/CompletionTest.php | 2 +- tests/LanguageServer/SymbolLookupTest.php | 1 + tests/StubTest.php | 1 + tests/UnusedCodeTest.php | 1 + tests/UnusedVariableTest.php | 1 + 13 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 670315176..69082bf92 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -80,13 +80,17 @@ class ConfigTest extends TestCase */ private function getProjectAnalyzerWithConfig(Config $config) { - return new \Psalm\Internal\Analyzer\ProjectAnalyzer( + $p = new \Psalm\Internal\Analyzer\ProjectAnalyzer( $config, new \Psalm\Internal\Provider\Providers( $this->file_provider, new Provider\FakeParserCacheProvider() ) ); + + $p->setPhpVersion('7.3'); + + return $p; } /** diff --git a/tests/DocumentationTest.php b/tests/DocumentationTest.php index 12bba07db..c18e847a5 100644 --- a/tests/DocumentationTest.php +++ b/tests/DocumentationTest.php @@ -76,6 +76,8 @@ class DocumentationTest extends TestCase new Provider\FakeParserCacheProvider() ) ); + + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/FileReferenceTest.php b/tests/FileReferenceTest.php index 360a1faa7..07afce1f2 100644 --- a/tests/FileReferenceTest.php +++ b/tests/FileReferenceTest.php @@ -29,6 +29,7 @@ class FileReferenceTest extends TestCase ); $this->project_analyzer->getCodebase()->collectReferences(); + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/FileUpdates/AnalyzedMethodTest.php b/tests/FileUpdates/AnalyzedMethodTest.php index 40d1a9a1e..a8b9859b3 100644 --- a/tests/FileUpdates/AnalyzedMethodTest.php +++ b/tests/FileUpdates/AnalyzedMethodTest.php @@ -39,6 +39,7 @@ class AnalyzedMethodTest extends \Psalm\Tests\TestCase 1, false ); + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/FileUpdates/CachedStorageTest.php b/tests/FileUpdates/CachedStorageTest.php index 3467a3274..35c26ed78 100644 --- a/tests/FileUpdates/CachedStorageTest.php +++ b/tests/FileUpdates/CachedStorageTest.php @@ -39,6 +39,7 @@ class CachedStorageTest extends \Psalm\Tests\TestCase 1, false ); + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/FileUpdates/ErrorAfterUpdateTest.php b/tests/FileUpdates/ErrorAfterUpdateTest.php index 8457658d1..a9995143c 100644 --- a/tests/FileUpdates/ErrorAfterUpdateTest.php +++ b/tests/FileUpdates/ErrorAfterUpdateTest.php @@ -39,6 +39,7 @@ class ErrorAfterUpdateTest extends \Psalm\Tests\TestCase 1, false ); + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/FileUpdates/ErrorFixTest.php b/tests/FileUpdates/ErrorFixTest.php index 246d7d70c..ee6216ac6 100644 --- a/tests/FileUpdates/ErrorFixTest.php +++ b/tests/FileUpdates/ErrorFixTest.php @@ -40,6 +40,7 @@ class ErrorFixTest extends \Psalm\Tests\TestCase 1, false ); + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/FileUpdates/TemporaryUpdateTest.php b/tests/FileUpdates/TemporaryUpdateTest.php index 04f09fd42..fe0049443 100644 --- a/tests/FileUpdates/TemporaryUpdateTest.php +++ b/tests/FileUpdates/TemporaryUpdateTest.php @@ -40,6 +40,7 @@ class TemporaryUpdateTest extends \Psalm\Tests\TestCase 1, false ); + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/LanguageServer/CompletionTest.php b/tests/LanguageServer/CompletionTest.php index 8526e8ada..165d91438 100644 --- a/tests/LanguageServer/CompletionTest.php +++ b/tests/LanguageServer/CompletionTest.php @@ -41,7 +41,7 @@ class CompletionTest extends \Psalm\Tests\TestCase 1, false ); - + $this->project_analyzer->setPhpVersion('7.3'); $this->project_analyzer->getCodebase()->server_mode = true; } diff --git a/tests/LanguageServer/SymbolLookupTest.php b/tests/LanguageServer/SymbolLookupTest.php index 9ff610473..3a4827276 100644 --- a/tests/LanguageServer/SymbolLookupTest.php +++ b/tests/LanguageServer/SymbolLookupTest.php @@ -43,6 +43,7 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase false ); + $this->project_analyzer->setPhpVersion('7.3'); $this->project_analyzer->getCodebase()->server_mode = true; } diff --git a/tests/StubTest.php b/tests/StubTest.php index b3d2ba024..ac2d6f206 100644 --- a/tests/StubTest.php +++ b/tests/StubTest.php @@ -50,6 +50,7 @@ class StubTest extends TestCase new Provider\FakeParserCacheProvider() ) ); + $project_analyzer->setPhpVersion('7.3'); $config->visitComposerAutoloadFiles($project_analyzer, false); diff --git a/tests/UnusedCodeTest.php b/tests/UnusedCodeTest.php index b3ea92210..c27921d2b 100644 --- a/tests/UnusedCodeTest.php +++ b/tests/UnusedCodeTest.php @@ -29,6 +29,7 @@ class UnusedCodeTest extends TestCase ); $this->project_analyzer->getCodebase()->reportUnusedCode(); + $this->project_analyzer->setPhpVersion('7.3'); } /** diff --git a/tests/UnusedVariableTest.php b/tests/UnusedVariableTest.php index 1a8d09276..f19cac6bc 100644 --- a/tests/UnusedVariableTest.php +++ b/tests/UnusedVariableTest.php @@ -28,6 +28,7 @@ class UnusedVariableTest extends TestCase ) ); + $this->project_analyzer->setPhpVersion('7.3'); $this->project_analyzer->getCodebase()->reportUnusedCode(); }