Skip to content

Commit

Permalink
Add test assertion message
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Jan 18, 2025
1 parent bdd2acb commit f893445
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ protected function assertMediaType(string|array $allowed, string|EncodedImage $i
fclose($pointer);

$allowed = is_string($allowed) ? [$allowed] : $allowed;
$this->assertTrue(in_array($detected, $allowed));
$this->assertTrue(
in_array($detected, $allowed),
'Detected media "' . $detected . '" type is not: ' . join(', ', $allowed),
);
}

protected function assertMediaTypeBitmap(string|EncodedImage $input): void
Expand Down

0 comments on commit f893445

Please sign in to comment.