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

Function interface_method_implementation

tests/integration/code_lens.rs:42–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41#[test]
42fn interface_method_implementation() {
43 let backend = create_test_backend();
44 let content = r#"<?php
45interface Greetable {
46 public function greet(): string;
47}
48
49class Greeter implements Greetable {
50 public function greet(): string { return 'hello'; }
51}
52"#;
53 let uri = "file:///test.php";
54 let lenses = get_code_lenses(&backend, uri, content);
55 let titles = lens_titles(&lenses);
56
57 assert_eq!(titles.len(), 1);
58 assert_eq!(titles[0], "◆ Greetable::greet");
59}
60
61#[test]
62fn no_lens_for_methods_without_prototype() {

Callers

nothing calls this directly

Calls 3

create_test_backendFunction · 0.85
get_code_lensesFunction · 0.85
lens_titlesFunction · 0.85

Tested by

no test coverage detected