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

Function static_method_call

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

Source from the content-addressed store, hash-verified

387
388#[tokio::test]
389async fn static_method_call() {
390 let backend = create_test_backend();
391 let uri = Url::parse("file:///test/inlay.php").unwrap();
392 let text = r#"<?php
393class Greeter {
394 public static function greet(string $name, int $age): void {}
395}
396Greeter::greet('Alice', 25);
397"#;
398
399 let hints = inlay_hints_for(&backend, &uri, text).await;
400 let line_hints = hints_at_line(&hints, 4);
401
402 let lbls = labels(&line_hints);
403 assert!(lbls.contains(&"name:".to_string()), "expected name: hint");
404 assert!(lbls.contains(&"age:".to_string()), "expected age: hint");
405}
406
407#[tokio::test]
408async fn constructor_call() {

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