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

Function include_string_literal

tests/integration/document_links.rs:54–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53#[test]
54fn include_string_literal() {
55 let dir = tempfile::tempdir().unwrap();
56 let target_file = dir.path().join("config.php");
57 fs::write(&target_file, "<?php // config").unwrap();
58
59 let main_content = format!("<?php\ninclude '{}';\n", target_file.to_string_lossy());
60 let main_uri = format!("file://{}", dir.path().join("main.php").to_string_lossy());
61
62 let backend = create_test_backend();
63 let links = get_document_links(&backend, &main_uri, &main_content);
64
65 assert_eq!(
66 links.len(),
67 1,
68 "Expected one include link, got: {:?}",
69 link_targets(&links)
70 );
71}
72
73#[test]
74fn require_string_literal() {

Callers

nothing calls this directly

Calls 3

create_test_backendFunction · 0.85
get_document_linksFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected