Helper: open a file in the backend by calling update_ast directly and storing the content in open_files so find_references can read it.
(backend: &phpantom_lsp::Backend, uri: &str, content: &str)
| 98 | /// Helper: open a file in the backend by calling update_ast directly |
| 99 | /// and storing the content in open_files so find_references can read it. |
| 100 | fn open_file(backend: &phpantom_lsp::Backend, uri: &str, content: &str) { |
| 101 | backend |
| 102 | .open_files() |
| 103 | .write() |
| 104 | .insert(uri.to_string(), Arc::new(content.to_string())); |
| 105 | backend.update_ast(uri, content); |
| 106 | } |
| 107 | |
| 108 | /// Helper to assert no duplicate locations exist in the results. |
| 109 | fn assert_no_duplicates(results: &[tower_lsp::lsp_types::Location], label: &str) { |