8000 change Pair creation for getLocalInspectionsAtCaret; provide addition… · Koc/idea-php-symfony2-plugin@32d2786 · GitHub
[go: up one dir, main page]

Skip to content

Commit 32d2786

Browse files
committed
change Pair creation for getLocalInspectionsAtCaret; provide additional array test for yaml tag shortcut
1 parent a3933aa commit 32d2786

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/fr/adrienbrault/idea/symfony2plugin/tests/SymfonyLightCodeInsightFixtureTestCase.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import com.intellij.navigation.GotoRelatedItem;
2323
import com.intellij.openapi.command.CommandProcessor;
2424
import com.intellij.openapi.editor.Editor;
25-
import com.intellij.openapi.editor.LogicalPosition;
26-
import com.intellij.openapi.editor.event.CaretEvent;
2725
import com.intellij.openapi.extensions.Extensions;
2826
import com.intellij.openapi.fileTypes.FileType;
2927
import com.intellij.openapi.fileTypes.LanguageFileType;
@@ -515,7 +513,7 @@ public void assertLocalInspectionNotContains(String filename, String content, St
515513
}
516514
}
517515

518-
private Pair<List<ProblemDescriptor>, Integer> getLocalInspectionsAtCaret(String filename, String content) {
516+
private Pair<List<ProblemDescriptor>, Integer> getLocalInspectionsAtCaret(@NotNull String filename, @NotNull String content) {
519517

520518
PsiElement psiFile = myFixture.configureByText(filename, content);
521519

@@ -545,7 +543,7 @@ public void visitElement(PsiElement element) {
545543
psiElementVisitor.visitFile(psiFile.getContainingFile());;
546544
}
547545

548-
return new Pair<List<ProblemDescriptor>, Integer>(problemsHolder.getResults(), caretOffset);
546+
return Pair.create(problemsHolder.getResults(), caretOffset);
549547
}
550548

551549
protected void assertLocalInspectionIsEmpty(String filename, String content) {

tests/fr/adrienbrault/idea/symfony2plugin/tests/stubs/indexes/ServicesTagStubIndexTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public void testTaggedServiceValueInIndex() {
3434
assertIndexContainsKeyWithValue(ServicesTagStubIndex.KEY, "foo.tagged.yaml_type", new MyStringContainsAssert("yaml_type_tag"));
3535

3636
assertIndexContainsKeyWithValue(ServicesTagStubIndex.KEY, "foo.tagged.yaml_type2", new MyStringContainsAssert("yaml_type_tag2"));
37+
assertIndexContainsKeyWithValue(ServicesTagStubIndex.KEY, "foo.tagged.yaml_type2", new MyStringContainsAssert("yaml_type_tag21"));
38+
3739
assertIndexContainsKeyWithValue(ServicesTagStubIndex.KEY, "foo.tagged.yaml_type3", new MyStringContainsAssert("yaml_type_tag3"));
3840
}
3941

tests/fr/adrienbrault/idea/symfony2plugin/tests/stubs/indexes/fixtures/tagged.services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66

77
foo.tagged.yaml_type2:
88
class: AppBundle\Controller\DefaultController
9-
tags: [ yaml_type_tag2 ]
9+
tags: [ yaml_type_tag2, yaml_type_tag21 ]
1010

1111
foo.tagged.yaml_type3:
1212
class: AppBundle\Controller\DefaultController

0 commit comments

Comments
 (0)
0