MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / test_completion_author_php

Function test_completion_author_php

tests/integration/blade_debug.rs:250–274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 5

create_test_backendFunction · 0.85
open_scaffoldingFunction · 0.85
completion_labelsFunction · 0.85
did_openMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected