diff --git a/.gitattributes b/.gitattributes index bdb0cabc8..4583c19ba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,3 +15,5 @@ *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain + +*.ft text eol=lf diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 6f92519b8..50210790a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -30,7 +30,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Run automated tests - run: ./gradlew test -i --no-daemon + run: ./gradlew test --no-daemon build-windows: runs-on: windows-latest @@ -54,7 +54,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Run automated tests - run: ./gradlew test -i --no-daemon + run: ./gradlew test --no-daemon build-macos: runs-on: macos-latest @@ -78,7 +78,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Run automated tests - run: ./gradlew test -i --no-daemon + run: ./gradlew test --no-daemon static-tests: runs-on: ubuntu-latest @@ -104,11 +104,11 @@ jobs: - id: file_changes uses: trilom/file-changes-action@v1.2.4 - name: Run Code Style Check - run: ./gradlew checkstyleCI -i --no-daemon + run: ./gradlew checkstyleCI --no-daemon env: MODIFIED_FILES: ${{ steps.file_changes.outputs.files}} ACTIONS_STEP_DEBUG: true - name: Run PMD Quality Check - run: ./gradlew pmdCI -i --no-daemon + run: ./gradlew pmdCI --no-daemon env: MODIFIED_FILES: ${{ steps.file_changes.outputs.files}} diff --git a/build.gradle b/build.gradle index abc520963..cd855dfac 100644 --- a/build.gradle +++ b/build.gradle @@ -4,10 +4,10 @@ */ plugins { - id 'org.jetbrains.intellij' version '1.1.4' + id 'org.jetbrains.intellij' version '1.11.0' id 'checkstyle' id 'pmd' - id 'org.jetbrains.changelog' version '1.2.1' + id 'org.jetbrains.changelog' version '2.0.0' } repositories { @@ -23,8 +23,8 @@ apply plugin: 'idea' apply plugin: 'groovy' apply plugin: 'org.jetbrains.changelog' -def phpPluginVersion = System.getProperty("phpPluginVersion", "212.5080.55") -def ideaVersion = System.getProperty("ideaVersion", "2021.2.1") +def phpPluginVersion = System.getProperty("phpPluginVersion", "222.3739.45") +def ideaVersion = System.getProperty("ideaVersion", "2022.2.1") def javaVersion = 11 sourceCompatibility = javaVersion @@ -41,7 +41,7 @@ intellij { 'properties', 'CSS', 'JavaScriptLanguage', - 'com.intellij.lang.jsgraphql:3.1.2', + 'com.intellij.lang.jsgraphql:3.2.1', 'platform-images', 'copyright' ] @@ -105,12 +105,26 @@ idea { } dependencies { - testImplementation 'junit:junit:4.13' - implementation 'com.googlecode.json-simple:json-simple:1.1.1' + implementation( + "org.junit.jupiter:junit-jupiter:5.8.2", + "com.googlecode.json-simple:json-simple:1.1.1" + ) + testRuntimeOnly('org.junit.vintage:junit-vintage-engine:5.9.0') + testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.9.0") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.00") } test { - useJUnit() - + useJUnitPlatform { + includeEngines("junit-vintage") + } + dependsOn cleanTest + testLogging.showStandardStreams = true + testLogging { + lifecycle { + events "skipped", "failed", "standard_error", "standard_out" + exceptionFormat "short" + } + } maxHeapSize = '1G' } diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index 99b019aa6..bd6507d20 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -24,7 +24,7 @@ - + diff --git a/src/com/magento/idea/magento2plugin/generation/php/MagentoTemplatesFactory.java b/src/com/magento/idea/magento2plugin/generation/php/MagentoTemplatesFactory.java index b9476e54f..97fbf879d 100644 --- a/src/com/magento/idea/magento2plugin/generation/php/MagentoTemplatesFactory.java +++ b/src/com/magento/idea/magento2plugin/generation/php/MagentoTemplatesFactory.java @@ -8,7 +8,7 @@ import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.platform.ProjectTemplate; import com.intellij.platform.ProjectTemplatesFactory; -import com.jetbrains.php.config.generation.PhpEmptyTemplatesFactory; +import com.jetbrains.php.config.generation.PhpEmptyProjectGenerator; import icons.PhpIcons; import javax.swing.Icon; import org.jetbrains.annotations.NotNull; @@ -18,7 +18,7 @@ public class MagentoTemplatesFactory extends ProjectTemplatesFactory { @NotNull public String[] getGroups() { - return new String[]{PhpEmptyTemplatesFactory.PHP_PROJECT_TEMPLATE_GROUP}; + return new String[]{PhpEmptyProjectGenerator.PHP_PROJECT_TEMPLATE_GROUP}; } public Icon getGroupIcon(final String group) { diff --git a/testData/actions/generation/generator/DeleteEntityGenerator/generateDeleteEntityFile/Delete.php b/testData/actions/generation/generator/DeleteEntityGenerator/generateDeleteEntityFile/Delete.php index ca631516e..be716e0c9 100644 --- a/testData/actions/generation/generator/DeleteEntityGenerator/generateDeleteEntityFile/Delete.php +++ b/testData/actions/generation/generator/DeleteEntityGenerator/generateDeleteEntityFile/Delete.php @@ -58,7 +58,7 @@ public function execute() try { $this->deleteByIdCommand->execute($entityId); $this->messageManager->addSuccessMessage(__('You have successfully deleted Company entity')); - } catch (CouldNotDeleteException | NoSuchEntityException $exception) { + } catch (CouldNotDeleteException|NoSuchEntityException $exception) { $this->messageManager->addErrorMessage($exception->getMessage()); } diff --git a/testData/actions/generation/generator/WebApiInterfaceGenerator/withObjectTypesAndPhpDocComments/SimpleServiceTwoInterface.php b/testData/actions/generation/generator/WebApiInterfaceGenerator/withObjectTypesAndPhpDocComments/SimpleServiceTwoInterface.php index 7c935e8a0..0c02a6c6a 100644 --- a/testData/actions/generation/generator/WebApiInterfaceGenerator/withObjectTypesAndPhpDocComments/SimpleServiceTwoInterface.php +++ b/testData/actions/generation/generator/WebApiInterfaceGenerator/withObjectTypesAndPhpDocComments/SimpleServiceTwoInterface.php @@ -22,7 +22,7 @@ public function execute(SimpleModelTwo $simpleModelTwo, ?string $param2 = null): /** * TODO: need to describe this method. - * + * @return void */ public function fetch(): void; } diff --git a/testData/actions/generation/generator/WebApiInterfaceGenerator/withPrimitiveTypes/SimpleServiceInterface.php b/testData/actions/generation/generator/WebApiInterfaceGenerator/withPrimitiveTypes/SimpleServiceInterface.php index fa4d57bec..e4b2941b6 100644 --- a/testData/actions/generation/generator/WebApiInterfaceGenerator/withPrimitiveTypes/SimpleServiceInterface.php +++ b/testData/actions/generation/generator/WebApiInterfaceGenerator/withPrimitiveTypes/SimpleServiceInterface.php @@ -13,6 +13,7 @@ interface SimpleServiceInterface * TODO: need to describe this method. * @param int $param1 * @param string $param2 + * @return void */ public function execute(int $param1, string $param2); } diff --git a/tests/com/magento/idea/magento2plugin/BaseProjectTestCase.java b/tests/com/magento/idea/magento2plugin/BaseProjectTestCase.java index 58d697dec..e25b5ccf4 100644 --- a/tests/com/magento/idea/magento2plugin/BaseProjectTestCase.java +++ b/tests/com/magento/idea/magento2plugin/BaseProjectTestCase.java @@ -2,23 +2,28 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + package com.magento.idea.magento2plugin; import com.intellij.openapi.util.text.StringUtil; +import com.intellij.testFramework.PlatformTestUtil; import com.intellij.testFramework.fixtures.BasePlatformTestCase; import com.magento.idea.magento2plugin.indexes.IndexManager; -import com.magento.idea.magento2plugin.project.Settings; import com.magento.idea.magento2plugin.magento.packages.File; +import com.magento.idea.magento2plugin.project.Settings; /** - * Configure test environment with Magento 2 project + * Configure test environment with Magento 2 project. */ -abstract public class BaseProjectTestCase extends BasePlatformTestCase { - private static final String testDataProjectPath = "testData" + File.separator + "project"; - private static final String testDataProjectDirectory = "magento2"; +public abstract class BaseProjectTestCase extends BasePlatformTestCase { + private static final String testDataProjectPath = "testData" //NOPMD + + File.separator + + "project"; + + private static final String testDataProjectDirectory = "magento2"; //NOPMD @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); copyMagento2ToTestProject(); enablePluginAndReindex(); @@ -39,27 +44,37 @@ protected String getTestDataPath() { } protected void enablePluginAndReindex() { - Settings settings = Settings.getInstance(myFixture.getProject()); + final Settings settings = Settings.getInstance(myFixture.getProject()); settings.magentoPath = "/src"; settings.pluginEnabled = true; settings.mftfSupportEnabled = true; IndexManager.manualReindex(); + PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); } protected void disablePluginAndReindex() { - Settings settings = Settings.getInstance(myFixture.getProject()); + final Settings settings = Settings.getInstance(myFixture.getProject()); settings.pluginEnabled = false; IndexManager.manualReindex(); + PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); } protected void disableMftfSupportAndReindex() { - Settings settings = Settings.getInstance(myFixture.getProject()); + final Settings settings = Settings.getInstance(myFixture.getProject()); settings.mftfSupportEnabled = false; IndexManager.manualReindex(); + PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); } - protected String prepareFixturePath(String fileName, String fixturesFolderPath) { - return fixturesFolderPath + getClass().getSimpleName().replace("Test", "") + File.separator + name() + File.separator + fileName; + protected String prepareFixturePath( + final String fileName, + final String fixturesFolderPath + ) { + return fixturesFolderPath + getClass().getSimpleName().replace("Test", "") + + File.separator + + name() + + File.separator + + fileName; } private String name() { diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/BaseGeneratorTestCase.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/BaseGeneratorTestCase.java index c713e54ac..4ed4691ae 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/BaseGeneratorTestCase.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/BaseGeneratorTestCase.java @@ -23,7 +23,7 @@ public abstract class BaseGeneratorTestCase extends BaseProjectTestCase { @Override @Before - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); myFixture.setTestDataPath(TEST_DATA_FOLDER_PATH); // Reset changed default code style settings to the previous default settings. @@ -32,7 +32,7 @@ protected void setUp() throws Exception { @Override @After - protected void tearDown() throws Exception { + public void tearDown() throws Exception { super.tearDown(); LightPlatformTestCase.closeAndDeleteProject(); } diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityCommandGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityCommandGeneratorTest.java index c16fe7a78..ee0a271fe 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityCommandGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityCommandGeneratorTest.java @@ -23,7 +23,7 @@ public class DeleteEntityCommandGeneratorTest extends BaseGeneratorTestCase { private static final String ACL = "Foo_Bar::book_management"; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); final EntityCreatorContext context = new EntityCreatorContext(); context.putUserData(EntityCreatorContext.DTO_TYPE, ENTITY_DTO_TYPE); diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityGeneratorTest.java index 3150828c2..d11ead6ef 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/DeleteEntityGeneratorTest.java @@ -22,7 +22,7 @@ public class DeleteEntityGeneratorTest extends BaseGeneratorTestCase { "/src/app/code/Foo/Bar/Controller/Adminhtml/" + ENTITY_NAME; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); final EntityCreatorContext context = new EntityCreatorContext(); context.putUserData(EntityCreatorContext.DTO_TYPE, ENTITY_DTO_TYPE); diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormButtonBlockGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormButtonBlockGeneratorTest.java index 9445ef239..c80afe551 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormButtonBlockGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormButtonBlockGeneratorTest.java @@ -11,6 +11,7 @@ import com.magento.idea.magento2plugin.actions.generation.data.UiComponentFormButtonData; import com.magento.idea.magento2plugin.actions.generation.generator.util.NamespaceBuilder; import com.magento.idea.magento2plugin.actions.generation.util.GenerationContextRegistry; +import org.junit.Before; public class FormButtonBlockGeneratorTest extends BaseGeneratorTestCase { @@ -25,7 +26,8 @@ public class FormButtonBlockGeneratorTest extends BaseGeneratorTestCase { = "src/app/code/Foo/Bar/Block/Form/" + ENTITY_NAME; @Override - protected void setUp() throws Exception { + @Before + public void setUp() throws Exception { super.setUp(); final EntityCreatorContext context = new EntityCreatorContext(); context.putUserData(EntityCreatorContext.DTO_TYPE, ENTITY_DTO_TYPE); diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormGenericButtonBlockGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormGenericButtonBlockGeneratorTest.java index bf56fe0b5..8f500851e 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormGenericButtonBlockGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/FormGenericButtonBlockGeneratorTest.java @@ -20,7 +20,7 @@ public class FormGenericButtonBlockGeneratorTest extends BaseGeneratorTestCase { = "src/app/code/Foo/Bar/Block/Form/" + ENTITY_NAME; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); final EntityCreatorContext context = new EntityCreatorContext(); context.putUserData(EntityCreatorContext.DTO_TYPE, ENTITY_DTO_TYPE); diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/GridActionColumnFileGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/GridActionColumnFileGeneratorTest.java index 7e1b780c7..b21d31d1f 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/GridActionColumnFileGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/GridActionColumnFileGeneratorTest.java @@ -20,7 +20,7 @@ public class GridActionColumnFileGeneratorTest extends BaseGeneratorTestCase { private static final String ENTITY_DTO_TYPE = "Foo\\Bar\\Model\\Data\\BookData"; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); final EntityCreatorContext context = new EntityCreatorContext(); context.putUserData(EntityCreatorContext.DTO_TYPE, ENTITY_DTO_TYPE); diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/ModuleResourceModelGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/ModuleResourceModelGeneratorTest.java index e0543fb29..d73fce143 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/ModuleResourceModelGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/ModuleResourceModelGeneratorTest.java @@ -18,7 +18,7 @@ public class ModuleResourceModelGeneratorTest extends BaseGeneratorTestCase { private static final String ENTITY_DTO_TYPE = "Foo\\Bar\\Model\\Data\\EntityData"; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); final EntityCreatorContext context = new EntityCreatorContext(); context.putUserData(EntityCreatorContext.DTO_TYPE, ENTITY_DTO_TYPE); diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridDataProviderGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridDataProviderGeneratorTest.java index 89d884112..0d240599b 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridDataProviderGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridDataProviderGeneratorTest.java @@ -26,7 +26,7 @@ public class UiComponentGridDataProviderGeneratorTest extends BaseGeneratorTestC private static final String ACL = "Foo_Bar::book_management"; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); final EntityCreatorContext context = new EntityCreatorContext(); context.putUserData(EntityCreatorContext.DTO_TYPE, ENTITY_DTO_TYPE); diff --git a/tests/com/magento/idea/magento2plugin/completion/BaseCompletionTestCase.java b/tests/com/magento/idea/magento2plugin/completion/BaseCompletionTestCase.java index 544117740..ca7dccdf5 100644 --- a/tests/com/magento/idea/magento2plugin/completion/BaseCompletionTestCase.java +++ b/tests/com/magento/idea/magento2plugin/completion/BaseCompletionTestCase.java @@ -16,7 +16,7 @@ public abstract class BaseCompletionTestCase extends BaseProjectTestCase { = "testData" + File.separator + "completion" + File.separator; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); myFixture.setTestDataPath(testDataFolderPath); } diff --git a/tests/com/magento/idea/magento2plugin/inspections/graphqls/InspectionGraphqlsFixtureTestCase.java b/tests/com/magento/idea/magento2plugin/inspections/graphqls/InspectionGraphqlsFixtureTestCase.java index 86bc27da4..d92ca85ee 100644 --- a/tests/com/magento/idea/magento2plugin/inspections/graphqls/InspectionGraphqlsFixtureTestCase.java +++ b/tests/com/magento/idea/magento2plugin/inspections/graphqls/InspectionGraphqlsFixtureTestCase.java @@ -8,13 +8,18 @@ import com.magento.idea.magento2plugin.inspections.BaseInspectionsTestCase; import com.magento.idea.magento2plugin.magento.packages.File; -abstract public class InspectionGraphqlsFixtureTestCase extends BaseInspectionsTestCase { +public abstract class InspectionGraphqlsFixtureTestCase extends BaseInspectionsTestCase { - private static final String testDataFolderPath = "testData" + File.separator + "inspections" + File.separator; - private static final String fixturesFolderPath = "graphqls" + File.separator; + private static final String testDataFolderPath = "testData" //NOPMD + + File.separator + + "inspections" + + File.separator; + + private static final String fixturesFolderPath = "graphqls" //NOPMD + + File.separator; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); myFixture.setTestDataPath(testDataFolderPath); } @@ -24,7 +29,7 @@ protected boolean isWriteActionRequired() { return false; } - protected String getFixturePath(String fileName) { + protected String getFixturePath(final String fileName) { return prepareFixturePath(fileName, fixturesFolderPath); } } diff --git a/tests/com/magento/idea/magento2plugin/inspections/php/InspectionPhpFixtureTestCase.java b/tests/com/magento/idea/magento2plugin/inspections/php/InspectionPhpFixtureTestCase.java index b7632706b..46c6d93cb 100644 --- a/tests/com/magento/idea/magento2plugin/inspections/php/InspectionPhpFixtureTestCase.java +++ b/tests/com/magento/idea/magento2plugin/inspections/php/InspectionPhpFixtureTestCase.java @@ -2,18 +2,24 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + package com.magento.idea.magento2plugin.inspections.php; import com.magento.idea.magento2plugin.inspections.BaseInspectionsTestCase; import com.magento.idea.magento2plugin.magento.packages.File; -abstract public class InspectionPhpFixtureTestCase extends BaseInspectionsTestCase { +public abstract class InspectionPhpFixtureTestCase extends BaseInspectionsTestCase { + + private static final String testDataFolderPath = "testData" //NOPMD + + File.separator + + "inspections" + + File.separator; - private static final String testDataFolderPath = "testData" + File.separator + "inspections" + File.separator; - private static final String fixturesFolderPath = "php" + File.separator; + private static final String fixturesFolderPath //NOPMD + = "php" + File.separator; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); myFixture.setTestDataPath(testDataFolderPath); } @@ -23,7 +29,7 @@ protected boolean isWriteActionRequired() { return false; } - protected String getFixturePath(String fileName) { + protected String getFixturePath(final String fileName) { return prepareFixturePath(fileName, fixturesFolderPath); } } diff --git a/tests/com/magento/idea/magento2plugin/inspections/xml/InspectionXmlFixtureTestCase.java b/tests/com/magento/idea/magento2plugin/inspections/xml/InspectionXmlFixtureTestCase.java index dd44ea3f5..7ead170af 100644 --- a/tests/com/magento/idea/magento2plugin/inspections/xml/InspectionXmlFixtureTestCase.java +++ b/tests/com/magento/idea/magento2plugin/inspections/xml/InspectionXmlFixtureTestCase.java @@ -1,15 +1,24 @@ +/* + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + package com.magento.idea.magento2plugin.inspections.xml; import com.magento.idea.magento2plugin.inspections.BaseInspectionsTestCase; import com.magento.idea.magento2plugin.magento.packages.File; -abstract public class InspectionXmlFixtureTestCase extends BaseInspectionsTestCase { +public abstract class InspectionXmlFixtureTestCase extends BaseInspectionsTestCase { + + private static final String testDataFolderPath = "testData" //NOPMD + + File.separator + + "inspections" + + File.separator; - private static final String testDataFolderPath = "testData" + File.separator + "inspections" + File.separator; - private static final String fixturesFolderPath = "xml" + File.separator; + private static final String fixturesFolderPath = "xml" + File.separator; //NOPMD @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); myFixture.setTestDataPath(testDataFolderPath); } @@ -19,7 +28,7 @@ protected boolean isWriteActionRequired() { return false; } - protected String getFixturePath(String fileName) { + protected String getFixturePath(final String fileName) { return prepareFixturePath(fileName, fixturesFolderPath); } } diff --git a/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java b/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java index 942752ab2..8d292c667 100644 --- a/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java +++ b/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java @@ -19,7 +19,7 @@ public abstract class LinemarkerFixtureTestCase extends BaseProjectTestCase { = "testData" + File.separator + "linemarker" + File.separator; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); myFixture.setTestDataPath(TEST_DATA_PATH); } diff --git a/tests/com/magento/idea/magento2plugin/reference/BaseReferenceTestCase.java b/tests/com/magento/idea/magento2plugin/reference/BaseReferenceTestCase.java index 4f50d8333..1a3adae14 100644 --- a/tests/com/magento/idea/magento2plugin/reference/BaseReferenceTestCase.java +++ b/tests/com/magento/idea/magento2plugin/reference/BaseReferenceTestCase.java @@ -37,7 +37,7 @@ public abstract class BaseReferenceTestCase extends BaseInspectionsTestCase { + "reference" + File.separator; @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); myFixture.setTestDataPath(testDataFolderPath); }