@@ -0,0 +1,2522 @@
+package fr.adrienbrault.idea.symfony2plugin.tests.templating.assets;%0A%0Aimport com.jetbrains.twig.TwigFileType;%0Aimport fr.adrienbrault.idea.symfony2plugin.tests.SymfonyLightCodeInsightFixtureTestCase;%0A%0Aimport java.io.File;%0A%0A/**%0A * @author Daniel Espendiller %3Cdaniel@espendiller.net%3E%0A * @see com.jetbrains.twig.completion.TwigCompletionContributor%0A */%0Apublic class TwigAssetsCompletionContributorTest extends SymfonyLightCodeInsightFixtureTestCase %7B%0A    %0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A%0A        createDummyFiles(%0A            %22web/assets/foo.css%22,%0A            %22web/assets/foo.less%22,%0A            %22web/assets/foo.sass%22,%0A            %22web/assets/foo.scss%22,%0A            %22web/assets/foo.js%22,%0A            %22web/assets/foo.dart%22,%0A            %22web/assets/foo.coffee%22,%0A            %22web/assets/foo.jpg%22,%0A            %22web/assets/foo.png%22,%0A            %22web/assets/foo.gif%22%0A        );%0A%0A    %7D%0A%0A    private void createDummyFiles(String... files) throws Exception %7B%0A        for (String file : files) %7B%0A            String path = myFixture.getProject().getBaseDir().getPath() + %22/%22 + file;%0A            File f = new File(path);%0A            f.getParentFile().mkdirs();%0A            f.createNewFile();%0A        %7D%0A    %7D%0A%0A    protected String getTestDataPath() %7B%0A        return new File(this.getClass().getResource(%22fixtures%22).getFile()).getAbsolutePath();%0A    %7D%0A%0A    public void testTwigAssetFunctionCompletion() %7B%0A        assertCompletionContains(TwigFileType.INSTANCE, %22%7B%7B asset('%3Ccaret%3E') %7D%7D%22, %22assets/foo.css%22, %22assets/foo.js%22, %22assets/foo.less%22, %22assets/foo.coffee%22);%0A        assertCompletionResultEquals(TwigFileType.INSTANCE, %22%3Cscript src=%5C%22assets/foo.coffee%3Ccaret%3E%5C%22%3E%3C/script%3E%22, %22%3Cscript src=%5C%22%7B%7B asset('assets/foo.coffee') %7D%7D%5C%22%3E%3C/script%3E%22);%0A    %7D%0A%0A    public void testTwigAssetsTagCompletion() %7B%0A        assertCompletionContains(TwigFileType.INSTANCE, %22%7B%25 stylesheets '%3Ccaret%3E' %25%7D%7B%25 endstylesheets %25%7D%22, %22assets/foo.css%22, %22assets/foo.less%22, %22assets/foo.sass%22, %22assets/foo.scss%22);%0A        assertCompletionNotContains(TwigFileType.INSTANCE, %22%7B%25 stylesheets '%3Ccaret%3E' %25%7D%7B%25 endstylesheets %25%7D%22, %22assets/foo.js%22, %22assets/foo.dart%22, %22assets/foo.coffee%22);%0A%0A        assertCompletionContains(TwigFileType.INSTANCE, %22%7B%25 javascripts '%3Ccaret%3E' %25%7D%7B%25 endjavascripts %25%7D%22, %22assets/foo.js%22, %22assets/foo.dart%22, %22assets/foo.coffee%22);%0A        assertCompletionNotContains(TwigFileType.INSTANCE, %22%7B%25 javascripts '%3Ccaret%3E' %25%7D%7B%25 endjavascripts %25%7D%22, %22assets/foo.css%22, %22assets/foo.less%22, %22assets/foo.sass%22, %22assets/foo.scss%22);%0A    %7D%0A%0A%7D%0A

add twig assets completion testing