Skip to content

Commit eab20ad

Browse files
committed
Added unit test for #1631
1 parent de0d5cb commit eab20ad

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/completion/yaml/YamlGotoCompletionRegistrarTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,14 @@ public void testThatDecoratesPrioritizeLookupElementOnInstance() {
101101
lookupElement -> "foo".equals(lookupElement.getItemText()) && lookupElement.isItemTextBold() && lookupElement.isItemTextBold()
102102
);
103103
}
104+
105+
public void testThatPhpConstAreCompletedAndNavigable() {
106+
assertCompletionIsEmpty(YAMLFileType.YML, "" +
107+
"services:\n" +
108+
" foo:\n" +
109+
" class: Foo\\Foobar\n" +
110+
" arguments: \n" +
111+
" - !php/const Foo\\Bar<caret>::BAZ\n"
112+
);
113+
}
104114
}

src/test/java/fr/adrienbrault/idea/symfony2plugin/tests/completion/yaml/fixtures/YamlGotoCompletionRegistrar.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
{
55
class Bar
66
{
7+
public const BAZ = 'baz';
8+
79
public function create() {}
810
}
911

1012
class Foobar extends Bar
1113
{
14+
public function __construct($arg = null) {}
1215
}
1316
}

0 commit comments

Comments
 (0)