()
| 1199 | |
| 1200 | #[test] |
| 1201 | fn inline_string_literal() { |
| 1202 | let php = r#"<?php |
| 1203 | function foo() { |
| 1204 | /*|*/$msg = 'hello world'; |
| 1205 | echo $msg; |
| 1206 | } |
| 1207 | "#; |
| 1208 | let content_without_marker = php.replace("/*|*/", ""); |
| 1209 | let edits = run_inline(php).expect("action should be offered"); |
| 1210 | let result = apply_edits(&content_without_marker, &edits); |
| 1211 | assert!( |
| 1212 | result.contains("echo 'hello world';"), |
| 1213 | "string literal should be inlined: got:\n{}", |
| 1214 | result |
| 1215 | ); |
| 1216 | } |
| 1217 | |
| 1218 | // ── Pure expression helpers ───────────────────────────────────── |
| 1219 |
nothing calls this directly
no test coverage detected