()
| 355 | |
| 356 | #[tokio::test] |
| 357 | async fn instance_method_call() { |
| 358 | let backend = create_test_backend(); |
| 359 | let uri = Url::parse("file:///test/inlay.php").unwrap(); |
| 360 | let text = r#"<?php |
| 361 | class Greeter { |
| 362 | public function greet(string $name, int $age): void {} |
| 363 | } |
| 364 | class Demo { |
| 365 | public function run(): void { |
| 366 | $g = new Greeter(); |
| 367 | $g->greet('Alice', 25); |
| 368 | } |
| 369 | } |
| 370 | "#; |
| 371 | |
| 372 | let hints = inlay_hints_for(&backend, &uri, text).await; |
| 373 | let line_hints = hints_at_line(&hints, 7); |
| 374 | |
| 375 | let lbls = labels(&line_hints); |
| 376 | assert!( |
| 377 | lbls.contains(&"name:".to_string()), |
| 378 | "expected name: hint, got {:?}", |
| 379 | lbls |
| 380 | ); |
| 381 | assert!( |
| 382 | lbls.contains(&"age:".to_string()), |
| 383 | "expected age: hint, got {:?}", |
| 384 | lbls |
| 385 | ); |
| 386 | } |
| 387 | |
| 388 | #[tokio::test] |
| 389 | async fn static_method_call() { |
nothing calls this directly
no test coverage detected