MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / test_parse_array_paths

Function test_parse_array_paths

tests/unit/composer.rs:82–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81#[test]
82fn 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]
102fn test_parse_no_composer_json() {

Callers

nothing calls this directly

Calls 2

parse_composer_jsonFunction · 0.85
rootMethod · 0.80

Tested by

no test coverage detected