()
| 72 | |
| 73 | #[test] |
| 74 | fn require_string_literal() { |
| 75 | let dir = tempfile::tempdir().unwrap(); |
| 76 | let target_file = dir.path().join("helpers.php"); |
| 77 | fs::write(&target_file, "<?php // helpers").unwrap(); |
| 78 | |
| 79 | let main_content = format!("<?php\nrequire '{}';\n", target_file.to_string_lossy()); |
| 80 | let main_uri = format!("file://{}", dir.path().join("main.php").to_string_lossy()); |
| 81 | |
| 82 | let backend = create_test_backend(); |
| 83 | let links = get_document_links(&backend, &main_uri, &main_content); |
| 84 | |
| 85 | assert_eq!( |
| 86 | links.len(), |
| 87 | 1, |
| 88 | "Expected one require link, got: {:?}", |
| 89 | link_targets(&links) |
| 90 | ); |
| 91 | } |
| 92 | |
| 93 | #[test] |
| 94 | fn include_once_string_literal() { |
nothing calls this directly
no test coverage detected