File tree Expand file tree Collapse file tree 3 files changed +28
-73
lines changed
src/test/java/fr/adrienbrault/idea/symfony2plugin/tests Expand file tree Collapse file tree 3 files changed +28
-73
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,8 @@ before_install:
2323
2424env :
2525 - 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"
26+ - 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"
2627 - 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"
27- - 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"
28- - 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"
2928
3029script :
3130- " ./gradlew check verifyPlugin buildPlugin"
Original file line number Diff line number Diff line change 11package fr .adrienbrault .idea .symfony2plugin .tests .intentions .yaml .dic ;
22
3- import com .intellij .openapi .application .ApplicationInfo ;
43import com .intellij .openapi .application .ApplicationManager ;
54import com .intellij .openapi .command .CommandProcessor ;
65import com .intellij .psi .util .PsiTreeUtil ;
2019 */
2120public class YamlCreateServiceArgumentsCallbackTest extends SymfonyLightCodeInsightFixtureTestCase {
2221
23- public void testFoo () {
24-
22+ public void testYamlServiceArgumentCreation () {
2523 YAMLFile yamlFile = YAMLElementGenerator .getInstance (getProject ()).createDummyYamlWithText ("" +
2624 "services:\n " +
2725 " foo:\n " +
@@ -48,26 +46,13 @@ public void run() {
4846 }
4947 }, null , null );
5048
51- ApplicationInfo instance = ApplicationInfo .getInstance ();
52- String minorVersion = instance .getMinorVersion ();
53- if ((instance .getMajorVersion ().equals ("2018" ) && Integer .valueOf (minorVersion ) >= 2 )) {
54- assertEquals ("" +
55- "services:\n " +
56- " foo:\n " +
57- " class: Foo\\ Foo\n " +
58- " arguments:\n " +
59- " ['@foo', '@?', '@?']\n " ,
60- yamlFile .getText ()
61- );
62- } else {
63- assertEquals ("" +
64- "services:\n " +
65- " foo:\n " +
66- " class: Foo\\ Foo\n " +
67- " arguments: ['@foo', '@?', '@?']\n " ,
68- yamlFile .getText ()
69- );
70- }
49+ assertEquals ("" +
50+ "services:\n " +
51+ " foo:\n " +
52+ " class: Foo\\ Foo\n " +
53+ " arguments:\n " +
54+ " ['@foo', '@?', '@?']\n " ,
55+ yamlFile .getText ()
56+ );
7157 }
72-
7358}
Original file line number Diff line number Diff line change 11package fr .adrienbrault .idea .symfony2plugin .tests .util .yaml ;
22
3- import com .intellij .openapi .application .ApplicationInfo ;
43import com .intellij .psi .PsiElement ;
54import com .intellij .util .Function ;
65import com .intellij .util .containers .ContainerUtil ;
@@ -337,31 +336,16 @@ public void testInsertKeyWithArrayValue() {
337336
338337 YamlHelper .insertKeyIntoFile (yamlFile , yamlKeyValue , "services" );
339338
340- ApplicationInfo instance = ApplicationInfo .getInstance ();
341- String minorVersion = instance .getMinorVersion ();
342- if ((instance .getMajorVersion ().equals ("2018" ) && Integer .valueOf (minorVersion ) >= 2 )) {
343- assertEquals ("" +
344- "services:\n " +
345- " foo:\n " +
346- " car: test\n " +
347- " my_service:\n " +
348- " class: foo\n " +
349- " tag:\n " +
350- " - foo" ,
351- yamlFile .getText ()
352- );
353- } else {
354- assertEquals ("" +
355- "services:\n " +
356- " foo:\n " +
357- " car: test\n " +
358- " my_service:\n " +
359- " class: foo\n " +
360- " tag:\n " +
361- " - foo" ,
362- yamlFile .getText ()
363- );
364- }
339+ assertEquals ("" +
340+ "services:\n " +
341+ " foo:\n " +
342+ " car: test\n " +
343+ " my_service:\n " +
344+ " class: foo\n " +
345+ " tag:\n " +
346+ " - foo" ,
347+ yamlFile .getText ()
348+ );
365349 }
366350
367351 /**
@@ -380,27 +364,14 @@ public void testInsertKeyValueWithMissingMainKeyInRoot() {
380364
381365 YamlHelper .insertKeyIntoFile (yamlFile , yamlKeyValue , "services" );
382366
383- ApplicationInfo instance = ApplicationInfo .getInstance ();
384- String minorVersion = instance .getMinorVersion ();
385- if ((instance .getMajorVersion ().equals ("2018" ) && Integer .valueOf (minorVersion ) >= 2 )) {
386- assertEquals ("" +
387- "foo: foo\n " +
388- "services:\n " +
389- " my_service:\n " +
390- " class: foo\n " +
391- " tag: foo" ,
392- yamlFile .getText ()
393- );
394- }else {
395- assertEquals ("" +
396- "foo: foo\n " +
397- "services:\n " +
398- " my_service:\n " +
399- " class: foo\n " +
400- " tag: foo" ,
401- yamlFile .getText ()
402- );
403- }
367+ assertEquals ("" +
368+ "foo: foo\n " +
369+ "services:\n " +
370+ " my_service:\n " +
371+ " class: foo\n " +
372+ " tag: foo" ,
373+ yamlFile .getText ()
374+ );
404375 }
405376
406377 /**
You can’t perform that action at this time.
0 commit comments