()
| 101 | |
| 102 | #[test] |
| 103 | fn grandparent_override() { |
| 104 | let backend = create_test_backend(); |
| 105 | let content = r#"<?php |
| 106 | class GrandParent_ { |
| 107 | public function legacy(): void {} |
| 108 | } |
| 109 | |
| 110 | class Parent_ extends GrandParent_ { |
| 111 | } |
| 112 | |
| 113 | class 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] |
| 128 | fn parent_overrides_grandparent_lens_points_to_parent() { |
nothing calls this directly
no test coverage detected