MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / context_simple_function

Function context_simple_function

tests/unit/named_args_internals.rs:261–274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259
260#[test]
261fn context_simple_function() {
262 let content = "<?php\nfoo(";
263 let pos = Position {
264 line: 1,
265 character: 4,
266 };
267 let ctx = detect_named_arg_context(content, pos);
268 assert!(ctx.is_some(), "Should detect context inside foo(");
269 let ctx = ctx.unwrap();
270 assert_eq!(ctx.call_expression, "foo");
271 assert!(ctx.existing_named_args.is_empty());
272 assert_eq!(ctx.positional_count, 0);
273 assert_eq!(ctx.prefix, "");
274}
275
276#[test]
277fn context_with_prefix() {

Callers

nothing calls this directly

Calls 2

detect_named_arg_contextFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected