()
| 80 | |
| 81 | #[test] |
| 82 | fn test_parse_array_paths() { |
| 83 | let ws = TestWorkspace::new( |
| 84 | r#"{ |
| 85 | "autoload": { |
| 86 | "psr-4": { |
| 87 | "App\\": ["src/", "lib/"] |
| 88 | } |
| 89 | } |
| 90 | }"#, |
| 91 | ); |
| 92 | |
| 93 | let (mappings, _vendor_dir) = parse_composer_json(ws.root()); |
| 94 | assert_eq!(mappings.len(), 2); |
| 95 | assert_eq!(mappings[0].prefix, "App\\"); |
| 96 | assert_eq!(mappings[0].base_path, "src/"); |
| 97 | assert_eq!(mappings[1].prefix, "App\\"); |
| 98 | assert_eq!(mappings[1].base_path, "lib/"); |
| 99 | } |
| 100 | |
| 101 | #[test] |
| 102 | fn test_parse_no_composer_json() { |
nothing calls this directly
no test coverage detected