()
| 1289 | |
| 1290 | #[test] |
| 1291 | fn 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] |
| 1316 | fn symbol_info_no_params() { |
nothing calls this directly
no test coverage detected