Skip to content

Commit 1ab55d8

Browse files
committed
fix test case condition for alter version; drop < 2018 testcase; already unsupported
1 parent 2584ec7 commit 1ab55d8

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/util/yaml/YamlHelperLightTest.java

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package fr.adrienbrault.idea.symfony2plugin.tests.util.yaml;
22

3-
import com.intellij.openapi.application.ApplicationInfo;
43
import com.intellij.psi.PsiElement;
54
import com.intellij.psi.PsiFile;
65
import com.intellij.util.Function;
@@ -339,31 +338,16 @@ public void testInsertKeyWithArrayValue() {
339338

340339
YamlHelper.insertKeyIntoFile(yamlFile, yamlKeyValue, "services");
341340

342-
ApplicationInfo instance = ApplicationInfo.getInstance();
343-
String minorVersion = instance.getMinorVersionMainPart();
344-
if (instance.getMajorVersion().equals("2019") || (instance.getMajorVersion().equals("2018") && Integer.valueOf(minorVersion) >= 3)) {
345-
assertEquals("" +
346-
"services:\n" +
347-
" foo:\n" +
348-
" car: test\n" +
349-
" my_service:\n" +
350-
" class: foo\n" +
351-
" tag:\n" +
352-
" - foo",
353-
yamlFile.getText()
354-
);
355-
} else {
356-
assertEquals("" +
357-
"services:\n" +
358-
" foo:\n" +
359-
" car: test\n" +
360-
" my_service:\n" +
361-
" class: foo\n" +
362-
" tag:\n" +
363-
" - foo",
364-
yamlFile.getText()
365-
);
366-
}
341+
String text = yamlFile.getText();
342+
assertEquals("services:\n" +
343+
" foo:\n" +
344+
" car: test\n" +
345+
" my_service:\n" +
346+
" class: foo\n" +
347+
" tag:\n" +
348+
" - foo",
349+
text
350+
);
367351
}
368352

369353
/**

0 commit comments

Comments
 (0)