()
| 71 | |
| 72 | #[test] |
| 73 | fn simple_assignment_and_read() { |
| 74 | let php = r#"<?php |
| 75 | function test() { |
| 76 | $x = 1; |
| 77 | echo $x; |
| 78 | } |
| 79 | "#; |
| 80 | let scope_map = collect_from_function(php); |
| 81 | |
| 82 | assert_eq!(count_kind(&scope_map, "$x", AccessKind::Write), 1); |
| 83 | assert_eq!(count_kind(&scope_map, "$x", AccessKind::Read), 1); |
| 84 | assert_eq!(scope_map.accesses.len(), 2); |
| 85 | } |
| 86 | |
| 87 | #[test] |
| 88 | fn parameter_is_write() { |
nothing calls this directly
no test coverage detected