From 75e17715b1d0188774e8780562a6d146ae7678dd Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Sun, 19 Apr 2020 13:07:54 -0400 Subject: [PATCH 01/10] Move tests directory to top level --- {VariableAnalysis/Tests => tests}/BaseTestCase.php | 0 .../Tests/CodeAnalysis => tests/Sniffs}/VariableAnalysisTest.php | 0 {VariableAnalysis/Tests => tests}/bootstrap.php | 0 .../CodeAnalysis => tests}/fixtures/AnonymousClassFixture.php | 0 .../fixtures/AnonymousClassWithPropertiesFixture.php | 0 .../fixtures/AssignmentByReferenceFixture.php | 0 .../CodeAnalysis => tests}/fixtures/ClassReferenceFixture.php | 0 .../CodeAnalysis => tests}/fixtures/ClassWithMembersFixture.php | 0 .../Tests/CodeAnalysis => tests}/fixtures/CompactFixture.php | 0 .../CodeAnalysis => tests}/fixtures/DestructuringFixture.php | 0 .../fixtures/FunctionWithClosureFixture.php | 0 .../fixtures/FunctionWithDefaultParamFixture.php | 0 .../fixtures/FunctionWithForeachFixture.php | 0 .../fixtures/FunctionWithGlobalVarFixture.php | 0 .../fixtures/FunctionWithInlineAssignFixture.php | 0 .../fixtures/FunctionWithRedeclarationsFixture.php | 0 .../fixtures/FunctionWithReferenceFixture.php | 0 .../fixtures/FunctionWithTryCatchFixture.php | 0 .../fixtures/FunctionWithUnusedParamsFixture.php | 0 .../fixtures/FunctionWithUseReferenceFixture.php | 0 .../fixtures/FunctionWithVariableCallFixture.php | 0 .../fixtures/FunctionWithoutParamFixture.php | 0 .../fixtures/FunctionsOutsideClassFixture.php | 0 .../CodeAnalysis => tests}/fixtures/GetDefinedVarsFixture.php | 0 .../Tests/CodeAnalysis => tests}/fixtures/HeredocFixture.php | 0 .../Tests/CodeAnalysis => tests}/fixtures/PregReplaceFixture.php | 0 .../fixtures/ThisWithinNestedClosedScopeFixture.php | 0 .../Tests/CodeAnalysis => tests}/fixtures/TraitFixture.php | 0 .../CodeAnalysis => tests}/fixtures/TraitWithMembersFixture.php | 0 .../fixtures/TraitWithPropertiesFixture.php | 0 .../CodeAnalysis => tests}/fixtures/UnusedAfterUsedFixture.php | 0 .../CodeAnalysis => tests}/fixtures/UnusedForeachFixture.php | 0 .../fixtures/UnusedVarWithValueChangeFixture.php | 0 .../CodeAnalysis => tests}/fixtures/VariableVariablesFixture.php | 0 34 files changed, 0 insertions(+), 0 deletions(-) rename {VariableAnalysis/Tests => tests}/BaseTestCase.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests/Sniffs}/VariableAnalysisTest.php (100%) rename {VariableAnalysis/Tests => tests}/bootstrap.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/AnonymousClassFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/AnonymousClassWithPropertiesFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/AssignmentByReferenceFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/ClassReferenceFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/ClassWithMembersFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/CompactFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/DestructuringFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithClosureFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithDefaultParamFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithForeachFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithGlobalVarFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithInlineAssignFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithRedeclarationsFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithReferenceFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithTryCatchFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithUnusedParamsFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithUseReferenceFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithVariableCallFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionWithoutParamFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/FunctionsOutsideClassFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/GetDefinedVarsFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/HeredocFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/PregReplaceFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/ThisWithinNestedClosedScopeFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/TraitFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/TraitWithMembersFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/TraitWithPropertiesFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/UnusedAfterUsedFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/UnusedForeachFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/UnusedVarWithValueChangeFixture.php (100%) rename {VariableAnalysis/Tests/CodeAnalysis => tests}/fixtures/VariableVariablesFixture.php (100%) diff --git a/VariableAnalysis/Tests/BaseTestCase.php b/tests/BaseTestCase.php similarity index 100% rename from VariableAnalysis/Tests/BaseTestCase.php rename to tests/BaseTestCase.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/VariableAnalysisTest.php b/tests/Sniffs/VariableAnalysisTest.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/VariableAnalysisTest.php rename to tests/Sniffs/VariableAnalysisTest.php diff --git a/VariableAnalysis/Tests/bootstrap.php b/tests/bootstrap.php similarity index 100% rename from VariableAnalysis/Tests/bootstrap.php rename to tests/bootstrap.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/AnonymousClassFixture.php b/tests/fixtures/AnonymousClassFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/AnonymousClassFixture.php rename to tests/fixtures/AnonymousClassFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/AnonymousClassWithPropertiesFixture.php b/tests/fixtures/AnonymousClassWithPropertiesFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/AnonymousClassWithPropertiesFixture.php rename to tests/fixtures/AnonymousClassWithPropertiesFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/AssignmentByReferenceFixture.php b/tests/fixtures/AssignmentByReferenceFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/AssignmentByReferenceFixture.php rename to tests/fixtures/AssignmentByReferenceFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/ClassReferenceFixture.php b/tests/fixtures/ClassReferenceFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/ClassReferenceFixture.php rename to tests/fixtures/ClassReferenceFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/ClassWithMembersFixture.php b/tests/fixtures/ClassWithMembersFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/ClassWithMembersFixture.php rename to tests/fixtures/ClassWithMembersFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/CompactFixture.php b/tests/fixtures/CompactFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/CompactFixture.php rename to tests/fixtures/CompactFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/DestructuringFixture.php b/tests/fixtures/DestructuringFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/DestructuringFixture.php rename to tests/fixtures/DestructuringFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithClosureFixture.php b/tests/fixtures/FunctionWithClosureFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithClosureFixture.php rename to tests/fixtures/FunctionWithClosureFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithDefaultParamFixture.php b/tests/fixtures/FunctionWithDefaultParamFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithDefaultParamFixture.php rename to tests/fixtures/FunctionWithDefaultParamFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithForeachFixture.php b/tests/fixtures/FunctionWithForeachFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithForeachFixture.php rename to tests/fixtures/FunctionWithForeachFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithGlobalVarFixture.php b/tests/fixtures/FunctionWithGlobalVarFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithGlobalVarFixture.php rename to tests/fixtures/FunctionWithGlobalVarFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithInlineAssignFixture.php b/tests/fixtures/FunctionWithInlineAssignFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithInlineAssignFixture.php rename to tests/fixtures/FunctionWithInlineAssignFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithRedeclarationsFixture.php b/tests/fixtures/FunctionWithRedeclarationsFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithRedeclarationsFixture.php rename to tests/fixtures/FunctionWithRedeclarationsFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithReferenceFixture.php b/tests/fixtures/FunctionWithReferenceFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithReferenceFixture.php rename to tests/fixtures/FunctionWithReferenceFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithTryCatchFixture.php b/tests/fixtures/FunctionWithTryCatchFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithTryCatchFixture.php rename to tests/fixtures/FunctionWithTryCatchFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithUnusedParamsFixture.php b/tests/fixtures/FunctionWithUnusedParamsFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithUnusedParamsFixture.php rename to tests/fixtures/FunctionWithUnusedParamsFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithUseReferenceFixture.php b/tests/fixtures/FunctionWithUseReferenceFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithUseReferenceFixture.php rename to tests/fixtures/FunctionWithUseReferenceFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithVariableCallFixture.php b/tests/fixtures/FunctionWithVariableCallFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithVariableCallFixture.php rename to tests/fixtures/FunctionWithVariableCallFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithoutParamFixture.php b/tests/fixtures/FunctionWithoutParamFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithoutParamFixture.php rename to tests/fixtures/FunctionWithoutParamFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionsOutsideClassFixture.php b/tests/fixtures/FunctionsOutsideClassFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionsOutsideClassFixture.php rename to tests/fixtures/FunctionsOutsideClassFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/GetDefinedVarsFixture.php b/tests/fixtures/GetDefinedVarsFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/GetDefinedVarsFixture.php rename to tests/fixtures/GetDefinedVarsFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/HeredocFixture.php b/tests/fixtures/HeredocFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/HeredocFixture.php rename to tests/fixtures/HeredocFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/PregReplaceFixture.php b/tests/fixtures/PregReplaceFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/PregReplaceFixture.php rename to tests/fixtures/PregReplaceFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/ThisWithinNestedClosedScopeFixture.php b/tests/fixtures/ThisWithinNestedClosedScopeFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/ThisWithinNestedClosedScopeFixture.php rename to tests/fixtures/ThisWithinNestedClosedScopeFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/TraitFixture.php b/tests/fixtures/TraitFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/TraitFixture.php rename to tests/fixtures/TraitFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/TraitWithMembersFixture.php b/tests/fixtures/TraitWithMembersFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/TraitWithMembersFixture.php rename to tests/fixtures/TraitWithMembersFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/TraitWithPropertiesFixture.php b/tests/fixtures/TraitWithPropertiesFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/TraitWithPropertiesFixture.php rename to tests/fixtures/TraitWithPropertiesFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/UnusedAfterUsedFixture.php b/tests/fixtures/UnusedAfterUsedFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/UnusedAfterUsedFixture.php rename to tests/fixtures/UnusedAfterUsedFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/UnusedForeachFixture.php b/tests/fixtures/UnusedForeachFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/UnusedForeachFixture.php rename to tests/fixtures/UnusedForeachFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/UnusedVarWithValueChangeFixture.php b/tests/fixtures/UnusedVarWithValueChangeFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/UnusedVarWithValueChangeFixture.php rename to tests/fixtures/UnusedVarWithValueChangeFixture.php diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/VariableVariablesFixture.php b/tests/fixtures/VariableVariablesFixture.php similarity index 100% rename from VariableAnalysis/Tests/CodeAnalysis/fixtures/VariableVariablesFixture.php rename to tests/fixtures/VariableVariablesFixture.php From 3b96e20d9bd16830f56325b83cec8d6b32e387b7 Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Sun, 19 Apr 2020 13:22:12 -0400 Subject: [PATCH 02/10] Modify tests directory path in other files --- .gitattributes | 2 +- phpcs.xml.dist | 10 ++-------- phpstan.neon.dist | 2 +- phpunit.circleci.xml | 4 ++-- phpunit.xml.dist | 4 ++-- tests/BaseTestCase.php | 4 ++-- tests/bootstrap.php | 2 +- 7 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.gitattributes b/.gitattributes index 3da5fabc..861f8b66 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,7 +13,7 @@ /phpunit.xml.dist export-ignore /phpunit.circleci.xml export-ignore /.circleci/ export-ignore -/VariableAnalysis/Tests/ export-ignore +/tests/ export-ignore # # Auto detect text files and perform LF normalization diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 745cf48b..0c48a2f0 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,14 +1,8 @@ - - Originally from https://gist.github.com/Ovsyanka/e2ab2ff76e7c0d7e75a1e4213a03ff95 - PSR2 with changes: - - bracers on end of line instead new line - - two space indentation - - ./VariableAnalysis/ - ./VariableAnalysis/Tests/CodeAnalysis/fixtures/ + ./tests/ + ./tests/fixtures/ diff --git a/phpstan.neon.dist b/phpstan.neon.dist index becd359d..1093a75b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -6,6 +6,6 @@ parameters: paths: - %currentWorkingDirectory%/VariableAnalysis/ excludes_analyse: - - %currentWorkingDirectory%/VariableAnalysis/Tests/ + - %currentWorkingDirectory%/tests/ ignoreErrors: - '~^Constant T_\w+ not found.$~' diff --git a/phpunit.circleci.xml b/phpunit.circleci.xml index d316d568..6496fd6b 100644 --- a/phpunit.circleci.xml +++ b/phpunit.circleci.xml @@ -1,9 +1,9 @@ - VariableAnalysis/Tests + tests diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d91e29a2..ee34c447 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,10 @@ - VariableAnalysis/Tests + tests diff --git a/tests/BaseTestCase.php b/tests/BaseTestCase.php index afadab20..f09b4cfd 100644 --- a/tests/BaseTestCase.php +++ b/tests/BaseTestCase.php @@ -8,7 +8,7 @@ class BaseTestCase extends TestCase { const STANDARD_NAME = 'VariableAnalysis'; - const SNIFF_FILE = __DIR__ . '/../Sniffs/CodeAnalysis/VariableAnalysisSniff.php'; + const SNIFF_FILE = __DIR__ . '/../VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php'; public function prepareLocalFileForSniffs($fixtureFile) { $config = new Config(); @@ -41,6 +41,6 @@ public function getErrorLineNumbersFromFile(LocalFile $phpcsFile) { } public function getFixture($fixtureFilename) { - return realpath(__DIR__ . '/CodeAnalysis/fixtures/' . $fixtureFilename); + return realpath(__DIR__ . '/fixtures/' . $fixtureFilename); } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 07c21022..079490fa 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,3 +1,3 @@ Date: Mon, 20 Apr 2020 12:59:59 -0400 Subject: [PATCH 03/10] Move fixtures back adjacent to tests --- phpcs.xml.dist | 2 +- tests/BaseTestCase.php | 2 +- tests/{ => Sniffs}/fixtures/AnonymousClassFixture.php | 0 .../fixtures/AnonymousClassWithPropertiesFixture.php | 0 tests/{ => Sniffs}/fixtures/AssignmentByReferenceFixture.php | 0 tests/{ => Sniffs}/fixtures/ClassReferenceFixture.php | 0 tests/{ => Sniffs}/fixtures/ClassWithMembersFixture.php | 0 tests/{ => Sniffs}/fixtures/CompactFixture.php | 0 tests/{ => Sniffs}/fixtures/DestructuringFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithClosureFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithDefaultParamFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithForeachFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithGlobalVarFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithInlineAssignFixture.php | 0 .../{ => Sniffs}/fixtures/FunctionWithRedeclarationsFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithReferenceFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithTryCatchFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithUnusedParamsFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithUseReferenceFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithVariableCallFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionWithoutParamFixture.php | 0 tests/{ => Sniffs}/fixtures/FunctionsOutsideClassFixture.php | 0 tests/{ => Sniffs}/fixtures/GetDefinedVarsFixture.php | 0 tests/{ => Sniffs}/fixtures/HeredocFixture.php | 0 tests/{ => Sniffs}/fixtures/PregReplaceFixture.php | 0 .../fixtures/ThisWithinNestedClosedScopeFixture.php | 0 tests/{ => Sniffs}/fixtures/TraitFixture.php | 0 tests/{ => Sniffs}/fixtures/TraitWithMembersFixture.php | 0 tests/{ => Sniffs}/fixtures/TraitWithPropertiesFixture.php | 0 tests/{ => Sniffs}/fixtures/UnusedAfterUsedFixture.php | 0 tests/{ => Sniffs}/fixtures/UnusedForeachFixture.php | 0 tests/{ => Sniffs}/fixtures/UnusedVarWithValueChangeFixture.php | 0 tests/{ => Sniffs}/fixtures/VariableVariablesFixture.php | 0 33 files changed, 2 insertions(+), 2 deletions(-) rename tests/{ => Sniffs}/fixtures/AnonymousClassFixture.php (100%) rename tests/{ => Sniffs}/fixtures/AnonymousClassWithPropertiesFixture.php (100%) rename tests/{ => Sniffs}/fixtures/AssignmentByReferenceFixture.php (100%) rename tests/{ => Sniffs}/fixtures/ClassReferenceFixture.php (100%) rename tests/{ => Sniffs}/fixtures/ClassWithMembersFixture.php (100%) rename tests/{ => Sniffs}/fixtures/CompactFixture.php (100%) rename tests/{ => Sniffs}/fixtures/DestructuringFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithClosureFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithDefaultParamFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithForeachFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithGlobalVarFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithInlineAssignFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithRedeclarationsFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithReferenceFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithTryCatchFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithUnusedParamsFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithUseReferenceFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithVariableCallFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionWithoutParamFixture.php (100%) rename tests/{ => Sniffs}/fixtures/FunctionsOutsideClassFixture.php (100%) rename tests/{ => Sniffs}/fixtures/GetDefinedVarsFixture.php (100%) rename tests/{ => Sniffs}/fixtures/HeredocFixture.php (100%) rename tests/{ => Sniffs}/fixtures/PregReplaceFixture.php (100%) rename tests/{ => Sniffs}/fixtures/ThisWithinNestedClosedScopeFixture.php (100%) rename tests/{ => Sniffs}/fixtures/TraitFixture.php (100%) rename tests/{ => Sniffs}/fixtures/TraitWithMembersFixture.php (100%) rename tests/{ => Sniffs}/fixtures/TraitWithPropertiesFixture.php (100%) rename tests/{ => Sniffs}/fixtures/UnusedAfterUsedFixture.php (100%) rename tests/{ => Sniffs}/fixtures/UnusedForeachFixture.php (100%) rename tests/{ => Sniffs}/fixtures/UnusedVarWithValueChangeFixture.php (100%) rename tests/{ => Sniffs}/fixtures/VariableVariablesFixture.php (100%) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 0c48a2f0..6d423173 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -2,7 +2,7 @@ ./VariableAnalysis/ ./tests/ - ./tests/fixtures/ + ./tests/Sniffs/fixtures/ diff --git a/tests/BaseTestCase.php b/tests/BaseTestCase.php index f09b4cfd..158ee7f0 100644 --- a/tests/BaseTestCase.php +++ b/tests/BaseTestCase.php @@ -41,6 +41,6 @@ public function getErrorLineNumbersFromFile(LocalFile $phpcsFile) { } public function getFixture($fixtureFilename) { - return realpath(__DIR__ . '/fixtures/' . $fixtureFilename); + return realpath(__DIR__ . '/Sniffs/fixtures/' . $fixtureFilename); } } diff --git a/tests/fixtures/AnonymousClassFixture.php b/tests/Sniffs/fixtures/AnonymousClassFixture.php similarity index 100% rename from tests/fixtures/AnonymousClassFixture.php rename to tests/Sniffs/fixtures/AnonymousClassFixture.php diff --git a/tests/fixtures/AnonymousClassWithPropertiesFixture.php b/tests/Sniffs/fixtures/AnonymousClassWithPropertiesFixture.php similarity index 100% rename from tests/fixtures/AnonymousClassWithPropertiesFixture.php rename to tests/Sniffs/fixtures/AnonymousClassWithPropertiesFixture.php diff --git a/tests/fixtures/AssignmentByReferenceFixture.php b/tests/Sniffs/fixtures/AssignmentByReferenceFixture.php similarity index 100% rename from tests/fixtures/AssignmentByReferenceFixture.php rename to tests/Sniffs/fixtures/AssignmentByReferenceFixture.php diff --git a/tests/fixtures/ClassReferenceFixture.php b/tests/Sniffs/fixtures/ClassReferenceFixture.php similarity index 100% rename from tests/fixtures/ClassReferenceFixture.php rename to tests/Sniffs/fixtures/ClassReferenceFixture.php diff --git a/tests/fixtures/ClassWithMembersFixture.php b/tests/Sniffs/fixtures/ClassWithMembersFixture.php similarity index 100% rename from tests/fixtures/ClassWithMembersFixture.php rename to tests/Sniffs/fixtures/ClassWithMembersFixture.php diff --git a/tests/fixtures/CompactFixture.php b/tests/Sniffs/fixtures/CompactFixture.php similarity index 100% rename from tests/fixtures/CompactFixture.php rename to tests/Sniffs/fixtures/CompactFixture.php diff --git a/tests/fixtures/DestructuringFixture.php b/tests/Sniffs/fixtures/DestructuringFixture.php similarity index 100% rename from tests/fixtures/DestructuringFixture.php rename to tests/Sniffs/fixtures/DestructuringFixture.php diff --git a/tests/fixtures/FunctionWithClosureFixture.php b/tests/Sniffs/fixtures/FunctionWithClosureFixture.php similarity index 100% rename from tests/fixtures/FunctionWithClosureFixture.php rename to tests/Sniffs/fixtures/FunctionWithClosureFixture.php diff --git a/tests/fixtures/FunctionWithDefaultParamFixture.php b/tests/Sniffs/fixtures/FunctionWithDefaultParamFixture.php similarity index 100% rename from tests/fixtures/FunctionWithDefaultParamFixture.php rename to tests/Sniffs/fixtures/FunctionWithDefaultParamFixture.php diff --git a/tests/fixtures/FunctionWithForeachFixture.php b/tests/Sniffs/fixtures/FunctionWithForeachFixture.php similarity index 100% rename from tests/fixtures/FunctionWithForeachFixture.php rename to tests/Sniffs/fixtures/FunctionWithForeachFixture.php diff --git a/tests/fixtures/FunctionWithGlobalVarFixture.php b/tests/Sniffs/fixtures/FunctionWithGlobalVarFixture.php similarity index 100% rename from tests/fixtures/FunctionWithGlobalVarFixture.php rename to tests/Sniffs/fixtures/FunctionWithGlobalVarFixture.php diff --git a/tests/fixtures/FunctionWithInlineAssignFixture.php b/tests/Sniffs/fixtures/FunctionWithInlineAssignFixture.php similarity index 100% rename from tests/fixtures/FunctionWithInlineAssignFixture.php rename to tests/Sniffs/fixtures/FunctionWithInlineAssignFixture.php diff --git a/tests/fixtures/FunctionWithRedeclarationsFixture.php b/tests/Sniffs/fixtures/FunctionWithRedeclarationsFixture.php similarity index 100% rename from tests/fixtures/FunctionWithRedeclarationsFixture.php rename to tests/Sniffs/fixtures/FunctionWithRedeclarationsFixture.php diff --git a/tests/fixtures/FunctionWithReferenceFixture.php b/tests/Sniffs/fixtures/FunctionWithReferenceFixture.php similarity index 100% rename from tests/fixtures/FunctionWithReferenceFixture.php rename to tests/Sniffs/fixtures/FunctionWithReferenceFixture.php diff --git a/tests/fixtures/FunctionWithTryCatchFixture.php b/tests/Sniffs/fixtures/FunctionWithTryCatchFixture.php similarity index 100% rename from tests/fixtures/FunctionWithTryCatchFixture.php rename to tests/Sniffs/fixtures/FunctionWithTryCatchFixture.php diff --git a/tests/fixtures/FunctionWithUnusedParamsFixture.php b/tests/Sniffs/fixtures/FunctionWithUnusedParamsFixture.php similarity index 100% rename from tests/fixtures/FunctionWithUnusedParamsFixture.php rename to tests/Sniffs/fixtures/FunctionWithUnusedParamsFixture.php diff --git a/tests/fixtures/FunctionWithUseReferenceFixture.php b/tests/Sniffs/fixtures/FunctionWithUseReferenceFixture.php similarity index 100% rename from tests/fixtures/FunctionWithUseReferenceFixture.php rename to tests/Sniffs/fixtures/FunctionWithUseReferenceFixture.php diff --git a/tests/fixtures/FunctionWithVariableCallFixture.php b/tests/Sniffs/fixtures/FunctionWithVariableCallFixture.php similarity index 100% rename from tests/fixtures/FunctionWithVariableCallFixture.php rename to tests/Sniffs/fixtures/FunctionWithVariableCallFixture.php diff --git a/tests/fixtures/FunctionWithoutParamFixture.php b/tests/Sniffs/fixtures/FunctionWithoutParamFixture.php similarity index 100% rename from tests/fixtures/FunctionWithoutParamFixture.php rename to tests/Sniffs/fixtures/FunctionWithoutParamFixture.php diff --git a/tests/fixtures/FunctionsOutsideClassFixture.php b/tests/Sniffs/fixtures/FunctionsOutsideClassFixture.php similarity index 100% rename from tests/fixtures/FunctionsOutsideClassFixture.php rename to tests/Sniffs/fixtures/FunctionsOutsideClassFixture.php diff --git a/tests/fixtures/GetDefinedVarsFixture.php b/tests/Sniffs/fixtures/GetDefinedVarsFixture.php similarity index 100% rename from tests/fixtures/GetDefinedVarsFixture.php rename to tests/Sniffs/fixtures/GetDefinedVarsFixture.php diff --git a/tests/fixtures/HeredocFixture.php b/tests/Sniffs/fixtures/HeredocFixture.php similarity index 100% rename from tests/fixtures/HeredocFixture.php rename to tests/Sniffs/fixtures/HeredocFixture.php diff --git a/tests/fixtures/PregReplaceFixture.php b/tests/Sniffs/fixtures/PregReplaceFixture.php similarity index 100% rename from tests/fixtures/PregReplaceFixture.php rename to tests/Sniffs/fixtures/PregReplaceFixture.php diff --git a/tests/fixtures/ThisWithinNestedClosedScopeFixture.php b/tests/Sniffs/fixtures/ThisWithinNestedClosedScopeFixture.php similarity index 100% rename from tests/fixtures/ThisWithinNestedClosedScopeFixture.php rename to tests/Sniffs/fixtures/ThisWithinNestedClosedScopeFixture.php diff --git a/tests/fixtures/TraitFixture.php b/tests/Sniffs/fixtures/TraitFixture.php similarity index 100% rename from tests/fixtures/TraitFixture.php rename to tests/Sniffs/fixtures/TraitFixture.php diff --git a/tests/fixtures/TraitWithMembersFixture.php b/tests/Sniffs/fixtures/TraitWithMembersFixture.php similarity index 100% rename from tests/fixtures/TraitWithMembersFixture.php rename to tests/Sniffs/fixtures/TraitWithMembersFixture.php diff --git a/tests/fixtures/TraitWithPropertiesFixture.php b/tests/Sniffs/fixtures/TraitWithPropertiesFixture.php similarity index 100% rename from tests/fixtures/TraitWithPropertiesFixture.php rename to tests/Sniffs/fixtures/TraitWithPropertiesFixture.php diff --git a/tests/fixtures/UnusedAfterUsedFixture.php b/tests/Sniffs/fixtures/UnusedAfterUsedFixture.php similarity index 100% rename from tests/fixtures/UnusedAfterUsedFixture.php rename to tests/Sniffs/fixtures/UnusedAfterUsedFixture.php diff --git a/tests/fixtures/UnusedForeachFixture.php b/tests/Sniffs/fixtures/UnusedForeachFixture.php similarity index 100% rename from tests/fixtures/UnusedForeachFixture.php rename to tests/Sniffs/fixtures/UnusedForeachFixture.php diff --git a/tests/fixtures/UnusedVarWithValueChangeFixture.php b/tests/Sniffs/fixtures/UnusedVarWithValueChangeFixture.php similarity index 100% rename from tests/fixtures/UnusedVarWithValueChangeFixture.php rename to tests/Sniffs/fixtures/UnusedVarWithValueChangeFixture.php diff --git a/tests/fixtures/VariableVariablesFixture.php b/tests/Sniffs/fixtures/VariableVariablesFixture.php similarity index 100% rename from tests/fixtures/VariableVariablesFixture.php rename to tests/Sniffs/fixtures/VariableVariablesFixture.php From 4804a39c72c573ae8d8157c078ca939bf7e15c50 Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Mon, 20 Apr 2020 13:01:39 -0400 Subject: [PATCH 04/10] Exclude vendor from phpcs --- phpcs.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 6d423173..ff452790 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -3,6 +3,7 @@ ./VariableAnalysis/ ./tests/ ./tests/Sniffs/fixtures/ + ./vendor/ From 4fba748080823ba5891f3dcffc48405c42107efd Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 21 Apr 2020 11:48:10 +0200 Subject: [PATCH 05/10] Tests: fix composer autoload 1. Make the namespace of the `VariableAnalysisTest` file reflect the path the file. 2. Add an `autoload-dev` section to the `composer.json` * The unit tests are not shipped in the distribution package, so they are only available in a `dev` environment, which is exactly what `autoload-dev` is targetting. * Setting the `tests` directory as a secondary path for PSR4 autoload should fix compatibility with Composer 2. --- composer.circleci.json | 5 +++++ composer.json | 5 +++++ tests/Sniffs/VariableAnalysisTest.php | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/composer.circleci.json b/composer.circleci.json index 485e2aaa..08a18612 100644 --- a/composer.circleci.json +++ b/composer.circleci.json @@ -26,6 +26,11 @@ "VariableAnalysis\\": "VariableAnalysis/" } }, + "autoload-dev": { + "psr-4": { + "VariableAnalysis\\Tests\\": "tests/" + } + }, "minimum-stability": "dev", "prefer-stable": true, "scripts": { diff --git a/composer.json b/composer.json index 810e75bc..c9301321 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,11 @@ "VariableAnalysis\\": "VariableAnalysis/" } }, + "autoload-dev": { + "psr-4": { + "VariableAnalysis\\Tests\\": "tests/" + } + }, "minimum-stability": "dev", "prefer-stable": true, "scripts": { diff --git a/tests/Sniffs/VariableAnalysisTest.php b/tests/Sniffs/VariableAnalysisTest.php index 9d15acc7..91d79690 100644 --- a/tests/Sniffs/VariableAnalysisTest.php +++ b/tests/Sniffs/VariableAnalysisTest.php @@ -1,5 +1,5 @@ Date: Tue, 21 Apr 2020 17:42:00 -0400 Subject: [PATCH 06/10] Rename tests/Sniffs to tests/VariableAnalysisSniff --- tests/{Sniffs => VariableAnalysisSniff}/VariableAnalysisTest.php | 0 .../fixtures/AnonymousClassFixture.php | 0 .../fixtures/AnonymousClassWithPropertiesFixture.php | 0 .../fixtures/AssignmentByReferenceFixture.php | 0 .../fixtures/ClassReferenceFixture.php | 0 .../fixtures/ClassWithMembersFixture.php | 0 .../{Sniffs => VariableAnalysisSniff}/fixtures/CompactFixture.php | 0 .../fixtures/DestructuringFixture.php | 0 .../fixtures/FunctionWithClosureFixture.php | 0 .../fixtures/FunctionWithDefaultParamFixture.php | 0 .../fixtures/FunctionWithForeachFixture.php | 0 .../fixtures/FunctionWithGlobalVarFixture.php | 0 .../fixtures/FunctionWithInlineAssignFixture.php | 0 .../fixtures/FunctionWithRedeclarationsFixture.php | 0 .../fixtures/FunctionWithReferenceFixture.php | 0 .../fixtures/FunctionWithTryCatchFixture.php | 0 .../fixtures/FunctionWithUnusedParamsFixture.php | 0 .../fixtures/FunctionWithUseReferenceFixture.php | 0 .../fixtures/FunctionWithVariableCallFixture.php | 0 .../fixtures/FunctionWithoutParamFixture.php | 0 .../fixtures/FunctionsOutsideClassFixture.php | 0 .../fixtures/GetDefinedVarsFixture.php | 0 .../{Sniffs => VariableAnalysisSniff}/fixtures/HeredocFixture.php | 0 .../fixtures/PregReplaceFixture.php | 0 .../fixtures/ThisWithinNestedClosedScopeFixture.php | 0 tests/{Sniffs => VariableAnalysisSniff}/fixtures/TraitFixture.php | 0 .../fixtures/TraitWithMembersFixture.php | 0 .../fixtures/TraitWithPropertiesFixture.php | 0 .../fixtures/UnusedAfterUsedFixture.php | 0 .../fixtures/UnusedForeachFixture.php | 0 .../fixtures/UnusedVarWithValueChangeFixture.php | 0 .../fixtures/VariableVariablesFixture.php | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename tests/{Sniffs => VariableAnalysisSniff}/VariableAnalysisTest.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/AnonymousClassFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/AnonymousClassWithPropertiesFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/AssignmentByReferenceFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/ClassReferenceFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/ClassWithMembersFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/CompactFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/DestructuringFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithClosureFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithDefaultParamFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithForeachFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithGlobalVarFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithInlineAssignFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithRedeclarationsFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithReferenceFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithTryCatchFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithUnusedParamsFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithUseReferenceFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithVariableCallFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionWithoutParamFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/FunctionsOutsideClassFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/GetDefinedVarsFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/HeredocFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/PregReplaceFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/ThisWithinNestedClosedScopeFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/TraitFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/TraitWithMembersFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/TraitWithPropertiesFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/UnusedAfterUsedFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/UnusedForeachFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/UnusedVarWithValueChangeFixture.php (100%) rename tests/{Sniffs => VariableAnalysisSniff}/fixtures/VariableVariablesFixture.php (100%) diff --git a/tests/Sniffs/VariableAnalysisTest.php b/tests/VariableAnalysisSniff/VariableAnalysisTest.php similarity index 100% rename from tests/Sniffs/VariableAnalysisTest.php rename to tests/VariableAnalysisSniff/VariableAnalysisTest.php diff --git a/tests/Sniffs/fixtures/AnonymousClassFixture.php b/tests/VariableAnalysisSniff/fixtures/AnonymousClassFixture.php similarity index 100% rename from tests/Sniffs/fixtures/AnonymousClassFixture.php rename to tests/VariableAnalysisSniff/fixtures/AnonymousClassFixture.php diff --git a/tests/Sniffs/fixtures/AnonymousClassWithPropertiesFixture.php b/tests/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php similarity index 100% rename from tests/Sniffs/fixtures/AnonymousClassWithPropertiesFixture.php rename to tests/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php diff --git a/tests/Sniffs/fixtures/AssignmentByReferenceFixture.php b/tests/VariableAnalysisSniff/fixtures/AssignmentByReferenceFixture.php similarity index 100% rename from tests/Sniffs/fixtures/AssignmentByReferenceFixture.php rename to tests/VariableAnalysisSniff/fixtures/AssignmentByReferenceFixture.php diff --git a/tests/Sniffs/fixtures/ClassReferenceFixture.php b/tests/VariableAnalysisSniff/fixtures/ClassReferenceFixture.php similarity index 100% rename from tests/Sniffs/fixtures/ClassReferenceFixture.php rename to tests/VariableAnalysisSniff/fixtures/ClassReferenceFixture.php diff --git a/tests/Sniffs/fixtures/ClassWithMembersFixture.php b/tests/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php similarity index 100% rename from tests/Sniffs/fixtures/ClassWithMembersFixture.php rename to tests/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php diff --git a/tests/Sniffs/fixtures/CompactFixture.php b/tests/VariableAnalysisSniff/fixtures/CompactFixture.php similarity index 100% rename from tests/Sniffs/fixtures/CompactFixture.php rename to tests/VariableAnalysisSniff/fixtures/CompactFixture.php diff --git a/tests/Sniffs/fixtures/DestructuringFixture.php b/tests/VariableAnalysisSniff/fixtures/DestructuringFixture.php similarity index 100% rename from tests/Sniffs/fixtures/DestructuringFixture.php rename to tests/VariableAnalysisSniff/fixtures/DestructuringFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithClosureFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithClosureFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithDefaultParamFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithDefaultParamFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithDefaultParamFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithDefaultParamFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithForeachFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithForeachFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithGlobalVarFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithGlobalVarFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithGlobalVarFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithGlobalVarFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithInlineAssignFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithInlineAssignFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithInlineAssignFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithInlineAssignFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithRedeclarationsFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithRedeclarationsFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithRedeclarationsFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithRedeclarationsFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithReferenceFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithReferenceFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithReferenceFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithReferenceFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithTryCatchFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithTryCatchFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithTryCatchFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithTryCatchFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithUnusedParamsFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithUnusedParamsFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithUseReferenceFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithUseReferenceFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithUseReferenceFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithUseReferenceFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithVariableCallFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithVariableCallFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithVariableCallFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithVariableCallFixture.php diff --git a/tests/Sniffs/fixtures/FunctionWithoutParamFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionWithoutParamFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionWithoutParamFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionWithoutParamFixture.php diff --git a/tests/Sniffs/fixtures/FunctionsOutsideClassFixture.php b/tests/VariableAnalysisSniff/fixtures/FunctionsOutsideClassFixture.php similarity index 100% rename from tests/Sniffs/fixtures/FunctionsOutsideClassFixture.php rename to tests/VariableAnalysisSniff/fixtures/FunctionsOutsideClassFixture.php diff --git a/tests/Sniffs/fixtures/GetDefinedVarsFixture.php b/tests/VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php similarity index 100% rename from tests/Sniffs/fixtures/GetDefinedVarsFixture.php rename to tests/VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php diff --git a/tests/Sniffs/fixtures/HeredocFixture.php b/tests/VariableAnalysisSniff/fixtures/HeredocFixture.php similarity index 100% rename from tests/Sniffs/fixtures/HeredocFixture.php rename to tests/VariableAnalysisSniff/fixtures/HeredocFixture.php diff --git a/tests/Sniffs/fixtures/PregReplaceFixture.php b/tests/VariableAnalysisSniff/fixtures/PregReplaceFixture.php similarity index 100% rename from tests/Sniffs/fixtures/PregReplaceFixture.php rename to tests/VariableAnalysisSniff/fixtures/PregReplaceFixture.php diff --git a/tests/Sniffs/fixtures/ThisWithinNestedClosedScopeFixture.php b/tests/VariableAnalysisSniff/fixtures/ThisWithinNestedClosedScopeFixture.php similarity index 100% rename from tests/Sniffs/fixtures/ThisWithinNestedClosedScopeFixture.php rename to tests/VariableAnalysisSniff/fixtures/ThisWithinNestedClosedScopeFixture.php diff --git a/tests/Sniffs/fixtures/TraitFixture.php b/tests/VariableAnalysisSniff/fixtures/TraitFixture.php similarity index 100% rename from tests/Sniffs/fixtures/TraitFixture.php rename to tests/VariableAnalysisSniff/fixtures/TraitFixture.php diff --git a/tests/Sniffs/fixtures/TraitWithMembersFixture.php b/tests/VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php similarity index 100% rename from tests/Sniffs/fixtures/TraitWithMembersFixture.php rename to tests/VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php diff --git a/tests/Sniffs/fixtures/TraitWithPropertiesFixture.php b/tests/VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php similarity index 100% rename from tests/Sniffs/fixtures/TraitWithPropertiesFixture.php rename to tests/VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php diff --git a/tests/Sniffs/fixtures/UnusedAfterUsedFixture.php b/tests/VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php similarity index 100% rename from tests/Sniffs/fixtures/UnusedAfterUsedFixture.php rename to tests/VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php diff --git a/tests/Sniffs/fixtures/UnusedForeachFixture.php b/tests/VariableAnalysisSniff/fixtures/UnusedForeachFixture.php similarity index 100% rename from tests/Sniffs/fixtures/UnusedForeachFixture.php rename to tests/VariableAnalysisSniff/fixtures/UnusedForeachFixture.php diff --git a/tests/Sniffs/fixtures/UnusedVarWithValueChangeFixture.php b/tests/VariableAnalysisSniff/fixtures/UnusedVarWithValueChangeFixture.php similarity index 100% rename from tests/Sniffs/fixtures/UnusedVarWithValueChangeFixture.php rename to tests/VariableAnalysisSniff/fixtures/UnusedVarWithValueChangeFixture.php diff --git a/tests/Sniffs/fixtures/VariableVariablesFixture.php b/tests/VariableAnalysisSniff/fixtures/VariableVariablesFixture.php similarity index 100% rename from tests/Sniffs/fixtures/VariableVariablesFixture.php rename to tests/VariableAnalysisSniff/fixtures/VariableVariablesFixture.php From f0dc133ae5063af32e54986db2a3070aa3e9eb4b Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Tue, 21 Apr 2020 17:42:57 -0400 Subject: [PATCH 07/10] Rename tests to Tests --- {tests => Tests}/BaseTestCase.php | 0 {tests => Tests}/VariableAnalysisSniff/VariableAnalysisTest.php | 0 .../VariableAnalysisSniff/fixtures/AnonymousClassFixture.php | 0 .../fixtures/AnonymousClassWithPropertiesFixture.php | 0 .../fixtures/AssignmentByReferenceFixture.php | 0 .../VariableAnalysisSniff/fixtures/ClassReferenceFixture.php | 0 .../VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php | 0 .../VariableAnalysisSniff/fixtures/CompactFixture.php | 0 .../VariableAnalysisSniff/fixtures/DestructuringFixture.php | 0 .../VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php | 0 .../fixtures/FunctionWithDefaultParamFixture.php | 0 .../VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php | 0 .../fixtures/FunctionWithGlobalVarFixture.php | 0 .../fixtures/FunctionWithInlineAssignFixture.php | 0 .../fixtures/FunctionWithRedeclarationsFixture.php | 0 .../fixtures/FunctionWithReferenceFixture.php | 0 .../fixtures/FunctionWithTryCatchFixture.php | 0 .../fixtures/FunctionWithUnusedParamsFixture.php | 0 .../fixtures/FunctionWithUseReferenceFixture.php | 0 .../fixtures/FunctionWithVariableCallFixture.php | 0 .../fixtures/FunctionWithoutParamFixture.php | 0 .../fixtures/FunctionsOutsideClassFixture.php | 0 .../VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php | 0 .../VariableAnalysisSniff/fixtures/HeredocFixture.php | 0 .../VariableAnalysisSniff/fixtures/PregReplaceFixture.php | 0 .../fixtures/ThisWithinNestedClosedScopeFixture.php | 0 {tests => Tests}/VariableAnalysisSniff/fixtures/TraitFixture.php | 0 .../VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php | 0 .../VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php | 0 .../VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php | 0 .../VariableAnalysisSniff/fixtures/UnusedForeachFixture.php | 0 .../fixtures/UnusedVarWithValueChangeFixture.php | 0 .../VariableAnalysisSniff/fixtures/VariableVariablesFixture.php | 0 {tests => Tests}/bootstrap.php | 0 34 files changed, 0 insertions(+), 0 deletions(-) rename {tests => Tests}/BaseTestCase.php (100%) rename {tests => Tests}/VariableAnalysisSniff/VariableAnalysisTest.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/AnonymousClassFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/AssignmentByReferenceFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/ClassReferenceFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/CompactFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/DestructuringFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithDefaultParamFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithGlobalVarFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithInlineAssignFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithRedeclarationsFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithReferenceFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithTryCatchFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithUseReferenceFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithVariableCallFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionWithoutParamFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/FunctionsOutsideClassFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/HeredocFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/PregReplaceFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/ThisWithinNestedClosedScopeFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/TraitFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/UnusedForeachFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/UnusedVarWithValueChangeFixture.php (100%) rename {tests => Tests}/VariableAnalysisSniff/fixtures/VariableVariablesFixture.php (100%) rename {tests => Tests}/bootstrap.php (100%) diff --git a/tests/BaseTestCase.php b/Tests/BaseTestCase.php similarity index 100% rename from tests/BaseTestCase.php rename to Tests/BaseTestCase.php diff --git a/tests/VariableAnalysisSniff/VariableAnalysisTest.php b/Tests/VariableAnalysisSniff/VariableAnalysisTest.php similarity index 100% rename from tests/VariableAnalysisSniff/VariableAnalysisTest.php rename to Tests/VariableAnalysisSniff/VariableAnalysisTest.php diff --git a/tests/VariableAnalysisSniff/fixtures/AnonymousClassFixture.php b/Tests/VariableAnalysisSniff/fixtures/AnonymousClassFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/AnonymousClassFixture.php rename to Tests/VariableAnalysisSniff/fixtures/AnonymousClassFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php b/Tests/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php rename to Tests/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/AssignmentByReferenceFixture.php b/Tests/VariableAnalysisSniff/fixtures/AssignmentByReferenceFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/AssignmentByReferenceFixture.php rename to Tests/VariableAnalysisSniff/fixtures/AssignmentByReferenceFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/ClassReferenceFixture.php b/Tests/VariableAnalysisSniff/fixtures/ClassReferenceFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/ClassReferenceFixture.php rename to Tests/VariableAnalysisSniff/fixtures/ClassReferenceFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php b/Tests/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php rename to Tests/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/CompactFixture.php b/Tests/VariableAnalysisSniff/fixtures/CompactFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/CompactFixture.php rename to Tests/VariableAnalysisSniff/fixtures/CompactFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/DestructuringFixture.php b/Tests/VariableAnalysisSniff/fixtures/DestructuringFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/DestructuringFixture.php rename to Tests/VariableAnalysisSniff/fixtures/DestructuringFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithClosureFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithDefaultParamFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithDefaultParamFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithDefaultParamFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithDefaultParamFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithForeachFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithGlobalVarFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithGlobalVarFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithGlobalVarFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithGlobalVarFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithInlineAssignFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithInlineAssignFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithInlineAssignFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithInlineAssignFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithRedeclarationsFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithRedeclarationsFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithRedeclarationsFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithRedeclarationsFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithReferenceFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithReferenceFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithReferenceFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithReferenceFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithTryCatchFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithTryCatchFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithTryCatchFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithTryCatchFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithUseReferenceFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithUseReferenceFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithUseReferenceFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithUseReferenceFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithVariableCallFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithVariableCallFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithVariableCallFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithVariableCallFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionWithoutParamFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionWithoutParamFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionWithoutParamFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionWithoutParamFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/FunctionsOutsideClassFixture.php b/Tests/VariableAnalysisSniff/fixtures/FunctionsOutsideClassFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/FunctionsOutsideClassFixture.php rename to Tests/VariableAnalysisSniff/fixtures/FunctionsOutsideClassFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php b/Tests/VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php rename to Tests/VariableAnalysisSniff/fixtures/GetDefinedVarsFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/HeredocFixture.php b/Tests/VariableAnalysisSniff/fixtures/HeredocFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/HeredocFixture.php rename to Tests/VariableAnalysisSniff/fixtures/HeredocFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/PregReplaceFixture.php b/Tests/VariableAnalysisSniff/fixtures/PregReplaceFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/PregReplaceFixture.php rename to Tests/VariableAnalysisSniff/fixtures/PregReplaceFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/ThisWithinNestedClosedScopeFixture.php b/Tests/VariableAnalysisSniff/fixtures/ThisWithinNestedClosedScopeFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/ThisWithinNestedClosedScopeFixture.php rename to Tests/VariableAnalysisSniff/fixtures/ThisWithinNestedClosedScopeFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/TraitFixture.php b/Tests/VariableAnalysisSniff/fixtures/TraitFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/TraitFixture.php rename to Tests/VariableAnalysisSniff/fixtures/TraitFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php b/Tests/VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php rename to Tests/VariableAnalysisSniff/fixtures/TraitWithMembersFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php b/Tests/VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php rename to Tests/VariableAnalysisSniff/fixtures/TraitWithPropertiesFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php b/Tests/VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php rename to Tests/VariableAnalysisSniff/fixtures/UnusedAfterUsedFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/UnusedForeachFixture.php b/Tests/VariableAnalysisSniff/fixtures/UnusedForeachFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/UnusedForeachFixture.php rename to Tests/VariableAnalysisSniff/fixtures/UnusedForeachFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/UnusedVarWithValueChangeFixture.php b/Tests/VariableAnalysisSniff/fixtures/UnusedVarWithValueChangeFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/UnusedVarWithValueChangeFixture.php rename to Tests/VariableAnalysisSniff/fixtures/UnusedVarWithValueChangeFixture.php diff --git a/tests/VariableAnalysisSniff/fixtures/VariableVariablesFixture.php b/Tests/VariableAnalysisSniff/fixtures/VariableVariablesFixture.php similarity index 100% rename from tests/VariableAnalysisSniff/fixtures/VariableVariablesFixture.php rename to Tests/VariableAnalysisSniff/fixtures/VariableVariablesFixture.php diff --git a/tests/bootstrap.php b/Tests/bootstrap.php similarity index 100% rename from tests/bootstrap.php rename to Tests/bootstrap.php From 8bd7c2843bb4f9d4cd9e1d66631a8ff5b982fda5 Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Tue, 21 Apr 2020 17:44:30 -0400 Subject: [PATCH 08/10] Rename Tests directory paths in files --- Tests/BaseTestCase.php | 2 +- composer.circleci.json | 2 +- composer.json | 2 +- phpcs.xml.dist | 4 ++-- phpstan.neon.dist | 2 +- phpunit.circleci.xml | 4 ++-- phpunit.xml.dist | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Tests/BaseTestCase.php b/Tests/BaseTestCase.php index 158ee7f0..5f4c9200 100644 --- a/Tests/BaseTestCase.php +++ b/Tests/BaseTestCase.php @@ -41,6 +41,6 @@ public function getErrorLineNumbersFromFile(LocalFile $phpcsFile) { } public function getFixture($fixtureFilename) { - return realpath(__DIR__ . '/Sniffs/fixtures/' . $fixtureFilename); + return realpath(__DIR__ . '/VariableAnalysisSniff/fixtures/' . $fixtureFilename); } } diff --git a/composer.circleci.json b/composer.circleci.json index 08a18612..dce6a631 100644 --- a/composer.circleci.json +++ b/composer.circleci.json @@ -28,7 +28,7 @@ }, "autoload-dev": { "psr-4": { - "VariableAnalysis\\Tests\\": "tests/" + "VariableAnalysis\\Tests\\": "Tests/" } }, "minimum-stability": "dev", diff --git a/composer.json b/composer.json index c9301321..dc27b5a8 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "autoload-dev": { "psr-4": { - "VariableAnalysis\\Tests\\": "tests/" + "VariableAnalysis\\Tests\\": "Tests/" } }, "minimum-stability": "dev", diff --git a/phpcs.xml.dist b/phpcs.xml.dist index ff452790..defd2eb2 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,8 +1,8 @@ ./VariableAnalysis/ - ./tests/ - ./tests/Sniffs/fixtures/ + ./Tests/ + ./Tests/VariableAnalysisSniff/fixtures/ ./vendor/ diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 1093a75b..725e053f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -6,6 +6,6 @@ parameters: paths: - %currentWorkingDirectory%/VariableAnalysis/ excludes_analyse: - - %currentWorkingDirectory%/tests/ + - %currentWorkingDirectory%/Tests/ ignoreErrors: - '~^Constant T_\w+ not found.$~' diff --git a/phpunit.circleci.xml b/phpunit.circleci.xml index 6496fd6b..32dac349 100644 --- a/phpunit.circleci.xml +++ b/phpunit.circleci.xml @@ -1,9 +1,9 @@ - tests + Tests diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ee34c447..07f4fd1f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,10 @@ - tests + Tests From f9ff25d088c26450999539ef511e02df9fa841fc Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Tue, 21 Apr 2020 17:47:47 -0400 Subject: [PATCH 09/10] Rename test namespace to match new path --- Tests/VariableAnalysisSniff/VariableAnalysisTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/VariableAnalysisSniff/VariableAnalysisTest.php b/Tests/VariableAnalysisSniff/VariableAnalysisTest.php index 91d79690..08a3f65f 100644 --- a/Tests/VariableAnalysisSniff/VariableAnalysisTest.php +++ b/Tests/VariableAnalysisSniff/VariableAnalysisTest.php @@ -1,5 +1,5 @@ Date: Thu, 23 Apr 2020 12:47:51 -0400 Subject: [PATCH 10/10] Update .gitattributes from tests to Tests Co-Authored-By: Juliette <663378+jrfnl@users.noreply.github.com> --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 861f8b66..6b1774d6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,7 +13,7 @@ /phpunit.xml.dist export-ignore /phpunit.circleci.xml export-ignore /.circleci/ export-ignore -/tests/ export-ignore +/Tests/ export-ignore # # Auto detect text files and perform LF normalization