Skip to content

Commit 47ec30d

Browse files
committed
Excluded non-public consts from !php/const autocompletion (unit tests)
1 parent 5d6fd5d commit 47ec30d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-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
@@ -123,6 +123,16 @@ public void testThatPhpConstAreCompletedAndNavigable() {
123123
"BAZ"
124124
);
125125

126+
assertCompletionNotContains(
127+
YAMLFileType.YML,
128+
"services:\n" +
129+
" foo:\n" +
130+
" class: Foo\\Foobar\n" +
131+
" arguments: \n" +
132+
" - !php/const Foo\\Bar::<caret>\n",
133+
"PROTECTED_CONST", "PRIVATE_CONST"
134+
);
135+
126136
assertCompletionIsEmpty(
127137
YAMLFileType.YML,
128138
"services:\n" +

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
class Bar
66
{
77
public const BAZ = 'baz';
8+
private const PRIVATE_CONST = 'private';
9+
protected const PROTECTED_CONST = 'protected';
810

911
public function create() {}
1012
}

0 commit comments

Comments
 (0)