()
| 793 | |
| 794 | #[test] |
| 795 | fn parse_no_matching_file() { |
| 796 | let json = r#"{ |
| 797 | "totals": {"errors": 0, "file_errors": 1}, |
| 798 | "files": { |
| 799 | "/project/src/Bar.php": { |
| 800 | "errors": 1, |
| 801 | "messages": [ |
| 802 | { |
| 803 | "message": "Error in Bar.", |
| 804 | "line": 1, |
| 805 | "ignorable": true, |
| 806 | "identifier": "phpstan" |
| 807 | } |
| 808 | ] |
| 809 | } |
| 810 | }, |
| 811 | "errors": [] |
| 812 | }"#; |
| 813 | let path = Path::new("/project/src/Foo.php"); |
| 814 | let diags = parse_phpstan_json(json, path).unwrap(); |
| 815 | assert!(diags.is_empty()); |
| 816 | } |
| 817 | |
| 818 | #[test] |
| 819 | fn parse_invalid_json() { |
nothing calls this directly
no test coverage detected