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:
23
23
24
24
env :
25
25
- 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"
26
27
- 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"
29
28
30
29
script :
31
30
- " ./gradlew check verifyPlugin buildPlugin"
Original file line number Diff line number Diff line change 1
1
package fr .adrienbrault .idea .symfony2plugin .tests .intentions .yaml .dic ;
2
2
3
- import com .intellij .openapi .application .ApplicationInfo ;
4
3
import com .intellij .openapi .application .ApplicationManager ;
5
4
import com .intellij .openapi .command .CommandProcessor ;
6
5
import com .intellij .psi .util .PsiTreeUtil ;
20
19
*/
21
20
public class YamlCreateServiceArgumentsCallbackTest extends SymfonyLightCodeInsightFixtureTestCase {
22
21
23
- public void testFoo () {
24
-
22
+ public void testYamlServiceArgumentCreation () {
25
23
YAMLFile yamlFile = YAMLElementGenerator .getInstance (getProject ()).createDummyYamlWithText ("" +
26
24
"services:\n " +
27
25
" foo:\n " +
@@ -48,26 +46,13 @@ public void run() {
48
46
}
49
47
}, null , null );
50
48
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
+ );
71
57
}
72
-
73
58
}
Original file line number Diff line number Diff line change 1
1
package fr .adrienbrault .idea .symfony2plugin .tests .util .yaml ;
2
2
3
- import com .intellij .openapi .application .ApplicationInfo ;
4
3
import com .intellij .psi .PsiElement ;
5
4
import com .intellij .util .Function ;
6
5
import com .intellij .util .containers .ContainerUtil ;
@@ -337,31 +336,16 @@ public void testInsertKeyWithArrayValue() {
337
336
338
337
YamlHelper .insertKeyIntoFile (yamlFile , yamlKeyValue , "services" );
339
338
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
+ );
365
349
}
366
350
367
351
/**
@@ -380,27 +364,14 @@ public void testInsertKeyValueWithMissingMainKeyInRoot() {
380
364
381
365
YamlHelper .insertKeyIntoFile (yamlFile , yamlKeyValue , "services" );
382
366
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
+ );
404
375
}
405
376
406
377
/**
You can’t perform that action at this time.
0 commit comments