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

Function grandparent_override

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

Source from the content-addressed store, hash-verified

101
102#[test]
103fn grandparent_override() {
104 let backend = create_test_backend();
105 let content = r#"<?php
106class GrandParent_ {
107 public function legacy(): void {}
108}
109
110class Parent_ extends GrandParent_ {
111}
112
113class Child extends Parent_ {
114 public function legacy(): void {}
115}
116"#;
117 let uri = "file:///test.php";
118 let lenses = get_code_lenses(&backend, uri, content);
119 let titles = lens_titles(&lenses);
120
121 assert_eq!(titles.len(), 1);
122 // Should point to the grandparent since that's where the method
123 // is actually declared.
124 assert_eq!(titles[0], "↑ GrandParent_::legacy");
125}
126
127#[test]
128fn parent_overrides_grandparent_lens_points_to_parent() {

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