()
| 698 | |
| 699 | #[test] |
| 700 | fn parse_top_level_errors() { |
| 701 | let json = r#"{ |
| 702 | "totals": {"errors": 1, "file_errors": 0}, |
| 703 | "files": {}, |
| 704 | "errors": ["PHPStan requires PHP >= 7.2.0, you have 7.1.0"] |
| 705 | }"#; |
| 706 | let path = Path::new("/project/src/Foo.php"); |
| 707 | let diags = parse_phpstan_json(json, path).unwrap(); |
| 708 | assert_eq!(diags.len(), 1); |
| 709 | assert_eq!(diags[0].range.start.line, 0); |
| 710 | assert!(diags[0].message.contains("PHP >= 7.2.0")); |
| 711 | } |
| 712 | |
| 713 | #[test] |
| 714 | fn parse_message_with_tip() { |
nothing calls this directly
no test coverage detected