pest
pest copied to clipboard
[Bug]: Wrong Exception message
What Happened
If $base <= 0 I'm expecting to throw an exception with the first message The base must be greater than 0,
else if $number <= 0 I'm expecting to throw an exception with the second message The number must be greater than 0,
else if $condition is false I'm expecting to throw an exception with the last message Fails!.
However, in all cases it throws an exception with the last message Fails!
How to Reproduce
expect($base > 0)->toBeTrue('The base must be greater than 0')
->and($number > 0)->toBeTrue('The number must be greater than 0')
->and($condition)->toBeTrue("Fails!");
Sample Repository
No response
Pest Version
2.34.8
PHP Version
8.3.7
Operation System
Linux
Notes
No response