JUnitParser
Turns a PHPUnit JUnit XML report into a flat, comparable map of test identity to outcome. A baseline/delta needs to know WHICH tests failed, not merely how many — counts cannot tell a newly broken test from one that was already red. PHPUnit's `--log-junit` is the machine-readable form that carries that identity, one `<testcase>` per test with its failure/error/skipped children. This parser is deliberately pure (a string in, an array out) so the diff logic and the handler that runs the subprocess can each be tested without the other.
JUnitParser::parse()
public function parse(string $xml): arrayParses a JUnit XML document into `"Class::method" => status`, where status is one of `passed`, `failed`, `errored`, or `skipped`. A testcase with an `<error>` child is `errored`, with a `<failure>` child is `failed`, with a `<skipped>` child is `skipped`, and otherwise `passed`. Error outranks failure because a testcase can carry both and an errored test is the stronger signal about what broke.
Parameters
| Name | Type | Description |
|---|---|---|
| $xml | string |
Throws
\InvalidArgumentException when the document is not well-formed XML