()
| 769 | |
| 770 | #[test] |
| 771 | fn classify_range_this_detection() { |
| 772 | let php = r#"<?php |
| 773 | class Foo { |
| 774 | public function test() { |
| 775 | $x = $this->bar(); |
| 776 | } |
| 777 | } |
| 778 | "#; |
| 779 | let scope_map = collect_from_method(php); |
| 780 | |
| 781 | let frame = &scope_map.frames[0]; |
| 782 | let classification = scope_map.classify_range(frame.start, frame.end); |
| 783 | assert!(classification.uses_this); |
| 784 | } |
| 785 | |
| 786 | #[test] |
| 787 | fn classify_range_no_this() { |
nothing calls this directly
no test coverage detected