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

Function this_method_call

tests/integration/inlay_hints.rs:489–507  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

487
488#[tokio::test]
489async 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
493class 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

Callers

nothing calls this directly

Calls 5

create_test_backendFunction · 0.85
inlay_hints_forFunction · 0.85
hints_at_lineFunction · 0.85
labelsFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected