Skip to content

Commit 4039a4e

Browse files
author
dudu
committed
Improve support for tag files generated with stable ctags
When tags don't have namespace information use just the name for matching in various contexts. This might result in incorrect answers but still more useful as do nothing when the tags file generated with unpatched ctags against a codebase with namespaces. Related to #5, #4
1 parent 946bf41 commit 4039a4e

14 files changed

+282
-25
lines changed

autoload/phpcomplete.vim

+62-18
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,28 @@ function! phpcomplete#CompleteUse(base) " {{{
305305
let tags = phpcomplete#GetTaglist('^'.namespace_match_pattern)
306306
endif
307307

308+
let patched_ctags_detected = 0
309+
let namespaced_matches = []
310+
let no_namespace_matches = []
308311
for tag in tags
312+
if has_key(tag, 'namespace')
313+
let patched_ctags_detected = 1
314+
endif
309315
if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
310-
call add(res, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename })
316+
let patched_ctags_detected = 1
317+
call add(namespaced_matches, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename })
311318
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i') && tag.namespace ==? namespace_for_class
312-
call add(res, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
319+
call add(namespaced_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
320+
elseif (tag.kind ==? 'c' || tag.kind ==? 'i')
321+
call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
313322
endif
314323
endfor
324+
" if it seems that the tags file have namespace informations we can safely throw
325+
" away namespaceless tag matches since we can be sure they are invalid
326+
if patched_ctags_detected
327+
no_namespace_matches = []
328+
endif
329+
let res += namespaced_matches + no_namespace_matches
315330
endif
316331

317332
if base !~ '\'
@@ -840,24 +855,36 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
840855
endif
841856

842857
if len(tags)
858+
let base_parts = split(a:base, '\')
859+
if len(base_parts) > 1
860+
let namespace_part = join(base_parts[0:-2], '\').'\'
861+
else
862+
let namespace_part = ''
863+
endif
864+
let no_namespace_matches = []
865+
let namespaced_matches = []
866+
let seen_namespaced_tag = 0
843867
for tag in tags
844-
if !has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && tag.name =~? '^'.base
845-
call add(res, {'word': leading_slash.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
868+
if has_key(tag, 'namespace')
869+
let seen_namespaced_tag = 1
870+
endif
871+
let relative_name = namespace_part.tag.name
872+
" match base without the namespace part for namespaced base but not namespaced tags, for tagfiles with old ctags
873+
if !has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && stridx(tag.name, base[len(namespace_part):]) == 0
874+
call add(no_namespace_matches, {'word': leading_slash.relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
846875
endif
847876
if has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && tag.namespace ==? namespace_for_class
848877
let full_name = tag.namespace.'\'.tag.name " absolute namespaced name (without leading '\')
849-
850-
let base_parts = split(a:base, '\')
851-
if len(base_parts) > 1
852-
let namespace_part = join(base_parts[0:-2], '\')
853-
else
854-
let namespace_part = ''
855-
endif
856-
let relative_name = (namespace_part == '' ? '' : namespace_part.'\').tag.name
857-
858-
call add(res, {'word': leading_slash == '\' ? leading_slash.full_name : relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
878+
call add(namespaced_matches, {'word': leading_slash == '\' ? leading_slash.full_name : relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
859879
endif
860880
endfor
881+
" if there was a tag with namespace field, assume tag files with namespace support, so the matches
882+
" without a namespace field are in the global namespace so if there were namespace in the base
883+
" we should not add them to the matches
884+
if seen_namespaced_tag && namespace_part != ''
885+
let no_namespace_matches = []
886+
endif
887+
let res += no_namespace_matches + namespaced_matches
861888
endif
862889

863890
" look for built in classnames and interfaces
@@ -2133,6 +2160,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
21332160
for [key, import] in items(imports)
21342161
" if theres a \ in the name we have it's definetly not a built in thing, look for tags
21352162
if import.name =~ '\\'
2163+
let patched_ctags_detected = 0
21362164
let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {})
21372165
let namespace_name_candidate = substitute(import.name, '\\', '\\\\', 'g')
21382166
" can be a namespace name as is, or can be a tagname at the end with a namespace
@@ -2143,15 +2171,31 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
21432171
if tag.kind == 'n' && tag.name == import.name
21442172
call extend(import, tag)
21452173
let import['builtin'] = 0
2174+
let patched_ctags_detected = 1
21462175
break
21472176
endif
21482177
" if the name matches with the extracted classname and namespace
2149-
if (tag.kind == 'c' || tag.kind == 'i') && tag.name == classname && has_key(tag, 'namespace') && tag.namespace == namespace_for_classes
2150-
call extend(import, tag)
2151-
let import['builtin'] = 0
2152-
break
2178+
if (tag.kind == 'c' || tag.kind == 'i') && tag.name == classname
2179+
if has_key(tag, 'namespace')
2180+
let patched_ctags_detected = 1
2181+
if tag.namespace == namespace_for_classes
2182+
call extend(import, tag)
2183+
let import['builtin'] = 0
2184+
break
2185+
endif
2186+
elseif !exists('no_namespace_candidate')
2187+
" save the first namespacless match to be used if no better
2188+
" candidate found later on
2189+
let no_namespace_candidate = tag
2190+
endif
21532191
endif
21542192
endfor
2193+
" there were a namespacless class name match, if we think that the
2194+
" tags are not generated with patched ctags we will take it as a match
2195+
if exists('no_namespace_candidate') && !patched_ctags_detected
2196+
call extend(import, no_namespace_candidate)
2197+
let import['builtin'] = 0
2198+
endif
21552199
else
21562200
" if no tags are found, extract the namespace from the name
21572201
let ns = matchstr(import.name, '\c\zs[a-zA-Z0-9\\]\+\ze\\' . name)

tests/CompleteClassName_test.vim

+75-4
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,31 @@ fun! TestCase_complete_classes_from_tags()
3030
call SetUp()
3131

3232
" set tags to a fixture
33-
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteClassName/tags'
33+
let tags_path = expand('%:p:h').'/'.'fixtures/CompleteClassName/tags'
34+
let old_style_tags_path = expand('%:p:h').'/'.'fixtures/CompleteClassName/old_style_tags'
35+
exe ':set tags='.tags_path
3436

3537
" open an empty file so no 'local' class will be picked up
3638
let path = expand('%:p:h')."/".'fixtures/CompleteClassName/empty.php'
3739
below 1new
3840
exe ":silent! edit ".path
3941

42+
let res = phpcomplete#CompleteClassName('T', ['c', 'i'], '\', {})
43+
call VUAssertEquals([
44+
\ {'word': 'TagClass', 'menu': 'fixtures/CompleteClassName/tagclass.php', 'info': 'fixtures/CompleteClassName/tagclass.php', 'kind': 'c'}],
45+
\ res)
46+
let res = phpcomplete#CompleteClassName('B', ['i'], '\', {})
47+
call VUAssertEquals([
48+
\ {'word': 'BarInterface', 'menu': 'fixtures/CompleteClassName/foo.class.php', 'info': 'fixtures/CompleteClassName/foo.class.php', 'kind': 'i'}],
49+
\ res, "should find only interfaces")
50+
let res = phpcomplete#CompleteClassName('B', ['c', 'i'], '\', {})
51+
call VUAssertEquals([
52+
\ {'word': 'BarClass', 'menu': 'fixtures/CompleteClassName/foo.class.php', 'info': 'fixtures/CompleteClassName/foo.class.php', 'kind': 'c'},
53+
\ {'word': 'BarInterface', 'menu': 'fixtures/CompleteClassName/foo.class.php', 'info': 'fixtures/CompleteClassName/foo.class.php', 'kind': 'i'}],
54+
\ res, "should find both classes and interfaces in tags")
4055

56+
" should work just the same with old ctags generated tag files
57+
exe ':set tags='.old_style_tags_path
4158
let res = phpcomplete#CompleteClassName('T', ['c', 'i'], '\', {})
4259
call VUAssertEquals([
4360
\ {'word': 'TagClass', 'menu': 'fixtures/CompleteClassName/tagclass.php', 'info': 'fixtures/CompleteClassName/tagclass.php', 'kind': 'c'}],
@@ -51,6 +68,7 @@ fun! TestCase_complete_classes_from_tags()
5168
\ {'word': 'BarClass', 'menu': 'fixtures/CompleteClassName/foo.class.php', 'info': 'fixtures/CompleteClassName/foo.class.php', 'kind': 'c'},
5269
\ {'word': 'BarInterface', 'menu': 'fixtures/CompleteClassName/foo.class.php', 'info': 'fixtures/CompleteClassName/foo.class.php', 'kind': 'i'}],
5370
\ res, "should find both classes and interfaces in tags")
71+
5472
silent! bw! %
5573
endf
5674

@@ -137,7 +155,9 @@ fun! TestCase_filters_class_names_with_the_namespaces_typed_in_base()
137155
call SetUp()
138156

139157
" set tags to a fixture
140-
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteClassName/tags'
158+
let tags_path = expand('%:p:h').'/'.'fixtures/CompleteClassName/tags'
159+
let old_style_tags_path = expand('%:p:h').'/'.'fixtures/CompleteClassName/old_style_tags'
160+
exe ':set tags='.tags_path
141161

142162
let res = phpcomplete#CompleteClassName('NS1\N', ['c'], '\', {})
143163
call VUAssertEquals([
@@ -148,13 +168,49 @@ fun! TestCase_filters_class_names_with_the_namespaces_typed_in_base()
148168
call VUAssertEquals([
149169
\ {'word': 'NS1\NameSpacedFooInterface', 'menu': 'fixtures/CompleteClassName/namespaced.foo.php', 'info': 'fixtures/CompleteClassName/namespaced.foo.php', 'kind': 'i'}],
150170
\ res)
171+
172+
" with old style ctags, just complete every classame that matches the
173+
" string after the last \
174+
exe ':set tags='.old_style_tags_path
175+
176+
let res = phpcomplete#CompleteClassName('NS1\N', ['c'], '\', {})
177+
call VUAssertEquals([
178+
\ {'word': 'NS1\NameSpacedFoo', 'menu': 'fixtures/CompleteClassName/namespaced.foo.php', 'info': 'fixtures/CompleteClassName/namespaced.foo.php', 'kind': 'c'}],
179+
\ res)
180+
let res = phpcomplete#CompleteClassName('NS1\N', ['i'], '\', {})
181+
call VUAssertEquals([
182+
\ {'word': 'NS1\NameSpacedFooInterface', 'menu': 'fixtures/CompleteClassName/namespaced.foo.php', 'info': 'fixtures/CompleteClassName/namespaced.foo.php', 'kind': 'i'}],
183+
\ res)
184+
185+
" test for when there are namespaces in the matched tags the non-namespaced
186+
" matches are thrown out
187+
exe ':set tags='.old_style_tags_path.','.tags_path
188+
let res = phpcomplete#CompleteClassName('NS1\NameSpacedF', ['c'], '\', {})
189+
call VUAssertEquals([
190+
\ {'word': 'NS1\NameSpacedFoo', 'menu': 'fixtures/CompleteClassName/namespaced.foo.php', 'info': 'fixtures/CompleteClassName/namespaced.foo.php', 'kind': 'c'}],
191+
\ res)
151192
endf
152193

153194
fun! TestCase_filters_class_names_with_the_current_namespace_but_doesnt_add_the_current_namespace_to_the_completion_word()
154195
call SetUp()
155196

197+
let tags_path = expand('%:p:h').'/'.'fixtures/CompleteClassName/tags'
198+
let old_style_tags_path = expand('%:p:h').'/'.'fixtures/CompleteClassName/old_style_tags'
156199
" set tags to a fixture
157-
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteClassName/tags'
200+
exe ':set tags='.tags_path
201+
202+
let res = phpcomplete#CompleteClassName('N', ['c'], 'NS1', {})
203+
call VUAssertEquals([
204+
\ {'word': 'NameSpacedFoo', 'menu': 'fixtures/CompleteClassName/namespaced.foo.php', 'info': 'fixtures/CompleteClassName/namespaced.foo.php', 'kind': 'c'}],
205+
\ res)
206+
207+
let res = phpcomplete#CompleteClassName('N', ['i'], 'NS1', {})
208+
call VUAssertEquals([
209+
\ {'word': 'NameSpacedFooInterface', 'menu': 'fixtures/CompleteClassName/namespaced.foo.php', 'info': 'fixtures/CompleteClassName/namespaced.foo.php', 'kind': 'i'}],
210+
\ res)
211+
212+
" old style tags
213+
exe ':set tags='.old_style_tags_path
158214

159215
let res = phpcomplete#CompleteClassName('N', ['c'], 'NS1', {})
160216
call VUAssertEquals([
@@ -184,8 +240,11 @@ endf
184240
fun! TestCase_completes_class_names_from_imported_namespaces_via_tags()
185241
call SetUp()
186242

243+
let tags_path = expand('%:p:h').'/'.'fixtures/common/namespaced_foo_tags'
244+
let old_style_tags_path = expand('%:p:h').'/'.'fixtures/common/old_style_namespaced_foo_tags'
245+
187246
" set tags to a fixture
188-
exe ':set tags='.expand('%:p:h').'/'.'fixtures/common/namespaced_foo_tags'
247+
exe ':set tags='.tags_path
189248

190249
" comlete classes from imported namespace
191250
let res = phpcomplete#CompleteClassName('SUBNS\F', ['c'], '\', {'SUBNS': {'name': 'NS1\SUBNS', 'kind': 'n', 'builtin': 0,}})
@@ -204,4 +263,16 @@ fun! TestCase_completes_class_names_from_imported_namespaces_via_tags()
204263
call VUAssertEquals([
205264
\ {'word': '\NS1\SUBNS\FooSub', 'menu': 'fixtures/common/namespaced_foo.php', 'info': 'fixtures/common/namespaced_foo.php', 'kind': 'c'}],
206265
\ res)
266+
267+
" set old tags to a fixture
268+
exe ':set tags='.old_style_tags_path
269+
270+
" without namespaces in tags, every classname that matches word after the
271+
" last \ will be returned
272+
let res = phpcomplete#CompleteClassName('SUBNS\F', ['c'], '\', {'SUBNS': {'name': 'NS1\SUBNS', 'kind': 'n', 'builtin': 0,}})
273+
call VUAssertEquals([
274+
\ {'word': 'SUBNS\Foo', 'menu': 'fixtures/common/fixtures/common/namespaced_foo.php', 'info': 'fixtures/common/fixtures/common/namespaced_foo.php', 'kind': 'c'},
275+
\ {'word': 'SUBNS\FooSub', 'menu': 'fixtures/common/fixtures/common/namespaced_foo.php', 'info': 'fixtures/common/fixtures/common/namespaced_foo.php', 'kind': 'c'},
276+
\ {'word': 'SUBNS\FooSubSub', 'menu': 'fixtures/common/fixtures/common/namespaced_foo.php', 'info': 'fixtures/common/fixtures/common/namespaced_foo.php', 'kind': 'c'}],
277+
\ res)
207278
endf

tests/CompleteGeneral_test.vim

+37-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ fun! TestCase_completes_functions_classes_constants_from_tags() " {{{
5555
\ {'word': 'common_public_static_method(', 'info': 'common_public_static_method($foo) - fixtures/CompleteGeneral/foo.php', 'menu': '$foo) - fixtures/CompleteGeneral/foo.php', 'kind': 'f'},
5656
\ {'word': 'common_static_public_method(', 'info': 'common_static_public_method($foo) - fixtures/CompleteGeneral/foo.php', 'menu': '$foo) - fixtures/CompleteGeneral/foo.php', 'kind': 'f'}],
5757
\ res)
58-
5958
endf " }}}
6059

6160
fun! TestCase_completes_function_signature_from_tags_if_field_available() " {{{
@@ -285,6 +284,19 @@ fun! TestCase_completes_class_names_from_tags_matching_namespaces() " {{{
285284
" completes classnames from subnamespaces
286285
let res = phpcomplete#CompleteGeneral('SUBNS\F', 'NS1', {})
287286
call VUAssertEquals([{'word': 'SUBNS\FooSub', 'kind': 'c', 'menu': ' - fixtures/CompleteGeneral/namespaced_foo.php', 'info': 'SUBNS\FooSub - fixtures/CompleteGeneral/namespaced_foo.php'}], res)
287+
288+
289+
" stable ctags branch with no actual namespace information
290+
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteGeneral/old_style_namespaced_tags'
291+
292+
" class names should be completed regardless of the namespaces,
293+
" simply matching the word after the last \ segment
294+
let res = phpcomplete#CompleteGeneral('\NS1\F', 'NS1', {})
295+
call VUAssertEquals([
296+
\ {'word': 'Foo', 'menu': ' - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'info': 'Foo - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'c'},
297+
\ {'word': 'FooSub', 'menu': ' - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'info': 'FooSub - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'c'},
298+
\ {'word': 'FooSubSub', 'menu': ' - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'info': 'FooSubSub - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'c'}],
299+
\ res)
288300
endf " }}}
289301

290302
fun! TestCase_completes_top_level_functions_from_tags_in_matching_namespaces() " {{{
@@ -311,6 +323,18 @@ fun! TestCase_completes_top_level_functions_from_tags_in_matching_namespaces() "
311323
call VUAssertEquals([
312324
\ {'word': 'SUBNS\barsub(', 'info': 'SUBNS\barsub() - fixtures/CompleteGeneral/namespaced_foo.php', 'menu': ') - fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'f'}],
313325
\ res)
326+
327+
" stable ctags branch with no actual namespace information
328+
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteGeneral/old_style_namespaced_tags'
329+
330+
" functions should be completed regardless of the namespaces,
331+
" simply matching the word after the last \ segment
332+
let res = phpcomplete#CompleteGeneral('\NS1\ba', 'NS1', {})
333+
call VUAssertEquals([
334+
\ {'word': 'bar(', 'info': 'bar() - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'menu': ') - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'f'},
335+
\ {'word': 'barsub(', 'info': 'barsub() - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'menu': ') - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'f'},
336+
\ {'word': 'barsubsub(', 'info': 'barsubsub() - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'menu': ') - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'f'}],
337+
\ res)
314338
endf " }}}
315339

316340
fun! TestCase_completes_constants_from_tags_in_matching_namespaces() " {{{
@@ -334,6 +358,18 @@ fun! TestCase_completes_constants_from_tags_in_matching_namespaces() " {{{
334358
\ {'word': 'SUBNS\ZAPSUB', 'menu': ' - fixtures/CompleteGeneral/namespaced_foo.php', 'info': 'SUBNS\ZAPSUB - fixtures/CompleteGeneral/namespaced_foo.php', 'kind': 'd'}],
335359
\ res)
336360

361+
" stable ctags branch with no actual namespace information
362+
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteGeneral/old_style_namespaced_tags'
363+
364+
" constants should be completed regardless of the namespaces,
365+
" simply matching the word after the last \ segment
366+
" leaves leading slash in
367+
let res = phpcomplete#CompleteGeneral('\NS1\Z', 'NS1', {})
368+
call VUAssertEquals([
369+
\ {'word': 'ZAP', 'menu': ' - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_constants.php', 'info': 'ZAP - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_constants.php', 'kind': 'd'},
370+
\ {'word': 'ZAPSUB', 'menu': ' - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_constants.php', 'info': 'ZAPSUB - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_constants.php', 'kind': 'd'},
371+
\ {'word': 'ZAPSUBSUB', 'menu': ' - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_constants.php', 'info': 'ZAPSUBSUB - fixtures/CompleteGeneral/fixtures/CompleteGeneral/namespaced_constants.php', 'kind': 'd'}],
372+
\ res)
337373
endf " }}}
338374

339375
fun! TestCase_returns_completions_from_imported_names() " {{{

tests/CompleteUse_test.vim

+8
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,16 @@ endf
7171

7272
fun! TestCase_completes_namespaces_and_classes_from_tags_when_a_leading_namespace_is_already_typed_in()
7373
call SetUp()
74+
7475
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteUse/tags'
76+
let res = phpcomplete#CompleteUse('Assetic\Asset\Ba')
77+
call VUAssertEquals([
78+
\ {'word': 'Assetic\Asset\BaseAsset', 'menu': 'fixtures/CompleteUse/foo.php', 'info': 'fixtures/CompleteUse/foo.php', 'kind': 'c'}],
79+
\ res)
7580

81+
" should complete tags matching the word after the last \ when no
82+
" namespaces found in tags file
83+
exe ':set tags='.expand('%:p:h').'/'.'fixtures/CompleteUse/old_style_tags'
7684
let res = phpcomplete#CompleteUse('Assetic\Asset\Ba')
7785
call VUAssertEquals([
7886
\ {'word': 'Assetic\Asset\BaseAsset', 'menu': 'fixtures/CompleteUse/foo.php', 'info': 'fixtures/CompleteUse/foo.php', 'kind': 'c'}],

tests/ExpandClassName_test.vim

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ endf
3131

3232
fun! TestCase_matches_classname_from_imported_names()
3333
call SetUp()
34-
exe ':set tags='.expand('%:p:h').'/'.'fixtures/common/namespaced_foo_tags'
3534

3635
" imported builtin
3736
let [classname, namespace] = phpcomplete#ExpandClassName('AO', 'Mahou', {'AO': {'name': 'ArrayObject', 'kind': 'c', 'builtin': 1,}})

0 commit comments

Comments
 (0)