1
1
package fr .adrienbrault .idea .symfony2plugin .tests .templating .assets ;
2
2
3
3
import com .jetbrains .twig .TwigFileType ;
4
- import fr .adrienbrault .idea .symfony2plugin .tests .SymfonyLightCodeInsightFixtureTestCase ;
4
+ import fr .adrienbrault .idea .symfony2plugin .tests .SymfonyTempCodeInsightFixtureTestCase ;
5
5
6
6
/**
7
7
* @author Daniel Espendiller <daniel@espendiller.net>
8
8
* @see com.jetbrains.twig.completion.TwigCompletionContributor
9
9
*/
10
- public class TwigAssetsCompletionContributorTest extends SymfonyLightCodeInsightFixtureTestCase {
10
+ public class TwigAssetsCompletionContributorTest extends SymfonyTempCodeInsightFixtureTestCase {
11
11
12
12
public void setUp () throws Exception {
13
13
super .setUp ();
14
- if (System .getenv ("PHPSTORM_ENV" ) != null ) return ;
15
-
16
- createDummyFiles (
14
+
15
+ createFiles (
17
16
"web/assets/foo.css" ,
18
17
"web/assets/foo.less" ,
19
18
"web/assets/foo.sass" ,
@@ -25,19 +24,14 @@ public void setUp() throws Exception {
25
24
"web/assets/foo.png" ,
26
25
"web/assets/foo.gif"
27
26
);
28
-
29
27
}
30
28
31
29
public void testTwigAssetFunctionCompletion () {
32
- if (System .getenv ("PHPSTORM_ENV" ) != null ) return ;
33
-
34
30
assertCompletionContains (TwigFileType .INSTANCE , "{{ asset('<caret>') }}" , "assets/foo.css" , "assets/foo.js" , "assets/foo.less" , "assets/foo.coffee" );
35
31
assertCompletionResultEquals (TwigFileType .INSTANCE , "<script src=\" assets/foo.coffee<caret>\" ></script>" , "<script src=\" {{ asset('assets/foo.coffee') }}\" ></script>" );
36
32
}
37
33
38
34
public void testTwigAssetsTagCompletion () {
39
- if (System .getenv ("PHPSTORM_ENV" ) != null ) return ;
40
-
41
35
assertCompletionContains (TwigFileType .INSTANCE , "{% stylesheets '<caret>' %}{% endstylesheets %}" , "assets/foo.css" , "assets/foo.less" , "assets/foo.sass" , "assets/foo.scss" );
42
36
assertCompletionNotContains (TwigFileType .INSTANCE , "{% stylesheets '<caret>' %}{% endstylesheets %}" , "assets/foo.js" , "assets/foo.dart" , "assets/foo.coffee" );
43
37
@@ -46,14 +40,10 @@ public void testTwigAssetsTagCompletion() {
46
40
}
47
41
48
42
public void testTwigAssetImageFunctionCompletion () {
49
- if (System .getenv ("PHPSTORM_ENV" ) != null ) return ;
50
-
51
43
assertCompletionResultEquals (TwigFileType .INSTANCE , "<img src=\" assets/foo.pn<caret>\" >" , "<img src=\" {{ asset('assets/foo.png') }}\" >" );
52
44
}
53
45
54
46
public void testTwigAbsoluteUrlFunctionCompletion () {
55
- if (System .getenv ("PHPSTORM_ENV" ) != null ) return ;
56
-
57
47
assertCompletionContains (TwigFileType .INSTANCE , "{{ absolute_url('<caret>') }}" , "assets/foo.css" , "assets/foo.js" , "assets/foo.less" , "assets/foo.coffee" );
58
48
}
59
49
}
0 commit comments