()
| 153 | |
| 154 | #[test] |
| 155 | fn test_resolve_nested_namespace() { |
| 156 | let ws = TestWorkspace::new( |
| 157 | r#"{ |
| 158 | "autoload": { |
| 159 | "psr-4": { |
| 160 | "Klarna\\": "src/Klarna/" |
| 161 | } |
| 162 | } |
| 163 | }"#, |
| 164 | ); |
| 165 | ws.create_php_file( |
| 166 | "src/Klarna/Rest/Order.php", |
| 167 | "<?php\nnamespace Klarna\\Rest;\nclass Order {}\n", |
| 168 | ); |
| 169 | |
| 170 | let (mappings, _vendor_dir) = parse_composer_json(ws.root()); |
| 171 | let result = resolve_class_path(&mappings, ws.root(), "Klarna\\Rest\\Order"); |
| 172 | |
| 173 | assert!(result.is_some()); |
| 174 | let path = result.unwrap(); |
| 175 | assert!(path.ends_with("src/Klarna/Rest/Order.php")); |
| 176 | } |
| 177 | |
| 178 | #[test] |
| 179 | fn test_resolve_canonical_fqn() { |
nothing calls this directly
no test coverage detected