()
| 487 | |
| 488 | #[tokio::test] |
| 489 | async fn this_method_call() { |
| 490 | let backend = create_test_backend(); |
| 491 | let uri = Url::parse("file:///test/inlay.php").unwrap(); |
| 492 | let text = r#"<?php |
| 493 | class Calculator { |
| 494 | public function add(int $a, int $b): int { return $a + $b; } |
| 495 | public function demo(): void { |
| 496 | $this->add(1, 2); |
| 497 | } |
| 498 | } |
| 499 | "#; |
| 500 | |
| 501 | let hints = inlay_hints_for(&backend, &uri, text).await; |
| 502 | let line_hints = hints_at_line(&hints, 4); |
| 503 | |
| 504 | let lbls = labels(&line_hints); |
| 505 | assert!(lbls.contains(&"a:".to_string()), "expected a: hint"); |
| 506 | assert!(lbls.contains(&"b:".to_string()), "expected b: hint"); |
| 507 | } |
| 508 | |
| 509 | // ─── Cross-file PSR-4 ─────────────────────────────────────────────────────── |
| 510 |
nothing calls this directly
no test coverage detected