Skip to content

Commit

Permalink
Make messages for errors during baseline loading consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 20, 2024
1 parent be53591 commit 87bbfc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Runner/Baseline/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public function read(string $baselineFile): Baseline
} catch (XmlException $e) {
throw new CannotLoadBaselineException(
sprintf(
'Cannot read baseline: %s',
'Cannot read baseline %s: %s',
$baselineFile,
trim($e->getMessage()),
),
);
Expand Down
4 changes: 1 addition & 3 deletions tests/end-to-end/baseline/baseline-invalid-xml.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ Time: %s, Memory: %s

There was 1 PHPUnit test runner warning:

1) Cannot read baseline: Could not load "%sbaseline.xml":

%snd%sag%s
1) Cannot read baseline %sbaseline.xml: %s

WARNINGS!
Tests: 1, Assertions: 1, Warnings: 1.

0 comments on commit 87bbfc7

Please # to comment.