()
| 248 | |
| 249 | #[tokio::test] |
| 250 | async fn test_completion_author_php() { |
| 251 | let backend = create_test_backend(); |
| 252 | open_scaffolding(&backend).await; |
| 253 | // Use a version with cursor after -> |
| 254 | let uri_str = "file:///equiv_completion.php"; |
| 255 | let text = |
| 256 | "<?php\n/**\n * @var \\App\\Models\\BlogAuthor $author\n */\necho e( $author-> );"; |
| 257 | backend |
| 258 | .did_open(DidOpenTextDocumentParams { |
| 259 | text_document: TextDocumentItem { |
| 260 | uri: Url::parse(uri_str).unwrap(), |
| 261 | language_id: "php".to_string(), |
| 262 | version: 1, |
| 263 | text: text.to_string(), |
| 264 | }, |
| 265 | }) |
| 266 | .await; |
| 267 | // "echo e( $author-> );" — line 4, col 17 |
| 268 | let labels = completion_labels(&backend, uri_str, 4, 17).await; |
| 269 | assert!( |
| 270 | labels.iter().any(|l| l == "name"), |
| 271 | "PHP: $author-> should offer 'name', got: {:?}", |
| 272 | labels |
| 273 | ); |
| 274 | } |
| 275 | |
| 276 | #[tokio::test] |
| 277 | async fn test_completion_author_blade() { |
nothing calls this directly
no test coverage detected