()
| 243 | |
| 244 | #[test] |
| 245 | fn do_while_variables() { |
| 246 | let php = r#"<?php |
| 247 | function test() { |
| 248 | $x = 0; |
| 249 | do { |
| 250 | $x++; |
| 251 | } while ($x < 10); |
| 252 | } |
| 253 | "#; |
| 254 | let scope_map = collect_from_function(php); |
| 255 | |
| 256 | assert_eq!(count_kind(&scope_map, "$x", AccessKind::Write), 1); |
| 257 | assert_eq!(count_kind(&scope_map, "$x", AccessKind::ReadWrite), 1); |
| 258 | assert_eq!(count_kind(&scope_map, "$x", AccessKind::Read), 1); // condition |
| 259 | } |
| 260 | |
| 261 | #[test] |
| 262 | fn switch_case_variables() { |
nothing calls this directly
no test coverage detected