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

Function symbol_info_reference_param

tests/unit/phpdoc_internals.rs:1291–1313  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1289
1290#[test]
1291fn symbol_info_reference_param() {
1292 let content = concat!(
1293 "<?php\n",
1294 "/**\n",
1295 " * @\n",
1296 " */\n",
1297 "function swap(int &$a, int &$b): void {}\n",
1298 );
1299 let pos = Position {
1300 line: 2,
1301 character: 4,
1302 };
1303 let info = extract_symbol_info(content, pos);
1304 assert_eq!(info.params.len(), 2);
1305 assert_eq!(
1306 info.params[0],
1307 (Some(PhpType::parse("int")), "$a".to_string())
1308 );
1309 assert_eq!(
1310 info.params[1],
1311 (Some(PhpType::parse("int")), "$b".to_string())
1312 );
1313}
1314
1315#[test]
1316fn symbol_info_no_params() {

Callers

nothing calls this directly

Calls 1

extract_symbol_infoFunction · 0.85

Tested by

no test coverage detected