()
| 617 | |
| 618 | #[test] |
| 619 | fn enclosing_frame_finds_function() { |
| 620 | let php = r#"<?php |
| 621 | function test() { |
| 622 | $x = 1; |
| 623 | } |
| 624 | "#; |
| 625 | let scope_map = collect_from_function(php); |
| 626 | |
| 627 | // Any offset inside the function body should find the function frame. |
| 628 | let frame = scope_map.enclosing_frame(scope_map.frames[0].start + 1); |
| 629 | assert!(frame.is_some()); |
| 630 | assert_eq!(frame.unwrap().kind, FrameKind::Function); |
| 631 | } |
| 632 | |
| 633 | #[test] |
| 634 | fn variables_in_scope_lists_all() { |
nothing calls this directly
no test coverage detected