()
| 275 | |
| 276 | #[tokio::test] |
| 277 | async fn test_completion_author_blade() { |
| 278 | let backend = create_test_backend(); |
| 279 | open_scaffolding(&backend).await; |
| 280 | let uri_str = "file:///resources/views/comp.blade.php"; |
| 281 | let text = "@php\n/**\n * @var \\App\\Models\\BlogAuthor $author\n */\n@endphp\n\n<p>{{ $author-> }}</p>"; |
| 282 | backend |
| 283 | .did_open(DidOpenTextDocumentParams { |
| 284 | text_document: TextDocumentItem { |
| 285 | uri: Url::parse(uri_str).unwrap(), |
| 286 | language_id: "blade".to_string(), |
| 287 | version: 1, |
| 288 | text: text.to_string(), |
| 289 | }, |
| 290 | }) |
| 291 | .await; |
| 292 | // "<p>{{ $author-> }}</p>" — line 6, col 15 |
| 293 | let labels = completion_labels(&backend, uri_str, 6, 15).await; |
| 294 | assert!( |
| 295 | labels.iter().any(|l| l == "name"), |
| 296 | "Blade: $author-> should offer 'name', got: {:?}", |
| 297 | labels |
| 298 | ); |
| 299 | } |
| 300 | |
| 301 | // ── GTD on ->name resolves to BlogAuthor::$name ───────────────────── |
| 302 |
nothing calls this directly
no test coverage detected