()
| 114 | |
| 115 | #[test] |
| 116 | fn hover_this_variable() { |
| 117 | let backend = create_test_backend(); |
| 118 | let uri = "file:///test.php"; |
| 119 | let content = r#"<?php |
| 120 | class User { |
| 121 | public function greet(): string { |
| 122 | return $this->name(); |
| 123 | } |
| 124 | } |
| 125 | "#; |
| 126 | |
| 127 | // Hover on `$this` (line 3, within the `$this` token) |
| 128 | let hover = hover_at(&backend, uri, content, 3, 16).expect("expected hover"); |
| 129 | let text = hover_text(&hover); |
| 130 | assert!(text.contains("$this"), "should mention $this: {}", text); |
| 131 | assert!(text.contains("User"), "should resolve to User: {}", text); |
| 132 | } |
| 133 | |
| 134 | #[test] |
| 135 | fn hover_variable_with_type() { |
nothing calls this directly
no test coverage detected