()
| 52 | |
| 53 | #[test] |
| 54 | fn 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] |
| 74 | fn require_string_literal() { |
nothing calls this directly
no test coverage detected