()
| 304 | |
| 305 | #[tokio::test] |
| 306 | async fn by_reference_indicator() { |
| 307 | let backend = create_test_backend(); |
| 308 | let uri = Url::parse("file:///test/inlay.php").unwrap(); |
| 309 | let text = r#"<?php |
| 310 | function modify(array &$data, string $label): void {} |
| 311 | $arr = []; |
| 312 | modify($arr, 'test'); |
| 313 | "#; |
| 314 | |
| 315 | let hints = inlay_hints_for(&backend, &uri, text).await; |
| 316 | let line_hints = hints_at_line(&hints, 3); |
| 317 | |
| 318 | // $arr matches $data → suppression of name, but &indicator still shows. |
| 319 | // Actually $arr does NOT match $data, so we get the full hint. |
| 320 | let lbls = labels(&line_hints); |
| 321 | assert!( |
| 322 | lbls.iter().any(|l| l.contains('&')), |
| 323 | "expected by-reference indicator, got {:?}", |
| 324 | lbls |
| 325 | ); |
| 326 | } |
| 327 | |
| 328 | #[tokio::test] |
| 329 | async fn by_reference_with_matching_name_still_shows() { |
nothing calls this directly
no test coverage detected