diff --git a/.travis.yml b/.travis.yml index 55bbab294..2a120a178 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,8 @@ before_install: env: - PHPSTORM_ENV="skip incomplete" IDEA_VERSION="IU-183.2153.8" PHP_PLUGIN_VERSION="183.2153.44" TWIG_PLUGIN_VERSION="183.2153.44" TOOLBOX_PLUGIN_VERSION="0.4.6" ANNOTATION_PLUGIN_VERSION="5.3" + - PHPSTORM_ENV="skip incomplete" IDEA_VERSION="IU-2018.2.5" PHP_PLUGIN_VERSION="182.4892.16" TWIG_PLUGIN_VERSION="182.3458.35" TOOLBOX_PLUGIN_VERSION="0.4.6" ANNOTATION_PLUGIN_VERSION="5.3" - PHPSTORM_ENV="skip incomplete" IDEA_VERSION="IU-2018.2" PHP_PLUGIN_VERSION="182.3684.42" TWIG_PLUGIN_VERSION="182.3458.35" TOOLBOX_PLUGIN_VERSION="0.4.6" ANNOTATION_PLUGIN_VERSION="5.3" - - PHPSTORM_ENV="skip incomplete" IDEA_VERSION="IU-2018.1" PHP_PLUGIN_VERSION="181.4203.565" TWIG_PLUGIN_VERSION="181.3741.23" TOOLBOX_PLUGIN_VERSION="0.4.6" ANNOTATION_PLUGIN_VERSION="5.3" - - PHPSTORM_ENV="skip incomplete" IDEA_VERSION="IU-2017.3.5" PHP_PLUGIN_VERSION="173.4301.34" TWIG_PLUGIN_VERSION="173.4301.7" TOOLBOX_PLUGIN_VERSION="0.4.6" ANNOTATION_PLUGIN_VERSION="5.2.1" script: - "./gradlew check verifyPlugin buildPlugin" diff --git a/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/intentions/yaml/dic/YamlCreateServiceArgumentsCallbackTest.java b/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/intentions/yaml/dic/YamlCreateServiceArgumentsCallbackTest.java index 2ee67bf87..5c143e2f4 100644 --- a/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/intentions/yaml/dic/YamlCreateServiceArgumentsCallbackTest.java +++ b/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/intentions/yaml/dic/YamlCreateServiceArgumentsCallbackTest.java @@ -1,6 +1,5 @@ package fr.adrienbrault.idea.symfony2plugin.tests.intentions.yaml.dic; -import com.intellij.openapi.application.ApplicationInfo; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.CommandProcessor; import com.intellij.psi.util.PsiTreeUtil; @@ -20,8 +19,7 @@ */ public class YamlCreateServiceArgumentsCallbackTest extends SymfonyLightCodeInsightFixtureTestCase { - public void testFoo() { - + public void testYamlServiceArgumentCreation() { YAMLFile yamlFile = YAMLElementGenerator.getInstance(getProject()).createDummyYamlWithText("" + "services:\n" + " foo:\n" + @@ -48,26 +46,13 @@ public void run() { } }, null, null); - ApplicationInfo instance = ApplicationInfo.getInstance(); - String minorVersion = instance.getMinorVersion(); - if ((instance.getMajorVersion().equals("2018") && Integer.valueOf(minorVersion) >= 2)) { - assertEquals("" + - "services:\n" + - " foo:\n" + - " class: Foo\\Foo\n" + - " arguments:\n" + - " ['@foo', '@?', '@?']\n", - yamlFile.getText() - ); - } else { - assertEquals("" + - "services:\n" + - " foo:\n" + - " class: Foo\\Foo\n" + - " arguments: ['@foo', '@?', '@?']\n", - yamlFile.getText() - ); - } + assertEquals("" + + "services:\n" + + " foo:\n" + + " class: Foo\\Foo\n" + + " arguments:\n" + + " ['@foo', '@?', '@?']\n", + yamlFile.getText() + ); } - } diff --git a/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/util/yaml/YamlHelperLightTest.java b/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/util/yaml/YamlHelperLightTest.java index a6c906762..32dcc88fa 100644 --- a/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/util/yaml/YamlHelperLightTest.java +++ b/src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/util/yaml/YamlHelperLightTest.java @@ -1,6 +1,5 @@ package fr.adrienbrault.idea.symfony2plugin.tests.util.yaml; -import com.intellij.openapi.application.ApplicationInfo; import com.intellij.psi.PsiElement; import com.intellij.util.Function; import com.intellij.util.containers.ContainerUtil; @@ -337,31 +336,16 @@ public void testInsertKeyWithArrayValue() { YamlHelper.insertKeyIntoFile(yamlFile, yamlKeyValue, "services"); - ApplicationInfo instance = ApplicationInfo.getInstance(); - String minorVersion = instance.getMinorVersion(); - if ((instance.getMajorVersion().equals("2018") && Integer.valueOf(minorVersion) >= 2)) { - assertEquals("" + - "services:\n" + - " foo:\n" + - " car: test\n" + - " my_service:\n" + - " class: foo\n" + - " tag:\n" + - " - foo", - yamlFile.getText() - ); - } else { - assertEquals("" + - "services:\n" + - " foo:\n" + - " car: test\n" + - " my_service:\n" + - " class: foo\n" + - " tag:\n" + - " - foo", - yamlFile.getText() - ); - } + assertEquals("" + + "services:\n" + + " foo:\n" + + " car: test\n" + + " my_service:\n" + + " class: foo\n" + + " tag:\n" + + " - foo", + yamlFile.getText() + ); } /** @@ -380,27 +364,14 @@ public void testInsertKeyValueWithMissingMainKeyInRoot() { YamlHelper.insertKeyIntoFile(yamlFile, yamlKeyValue, "services"); - ApplicationInfo instance = ApplicationInfo.getInstance(); - String minorVersion = instance.getMinorVersion(); - if ((instance.getMajorVersion().equals("2018") && Integer.valueOf(minorVersion) >= 2)) { - assertEquals("" + - "foo: foo\n" + - "services:\n" + - " my_service:\n" + - " class: foo\n" + - " tag: foo", - yamlFile.getText() - ); - }else { - assertEquals("" + - "foo: foo\n" + - "services:\n" + - " my_service:\n" + - " class: foo\n" + - " tag: foo", - yamlFile.getText() - ); - } + assertEquals("" + + "foo: foo\n" + + "services:\n" + + " my_service:\n" + + " class: foo\n" + + " tag: foo", + yamlFile.getText() + ); } /**