Replies: 2 comments
-
As for now is not possible in a simple way, you could create a custom expectation or trigger a custom error message this way: it('should not fail', function () {
try{
expect(false)->toBeTrue();
}catch(ExpectationFailedException $exception){
throw new ExpectationFailedException('My custom error message');
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is now possible, just with a different format. expect('foo')->toBe('foo', 'uh oh'); or for no-value expectations... expect(true)->toBe(true, 'oops'); Edit: @fabio-ivona, I just noticed it was you that added this support. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I can't find a way to write a custom error message when a test fail.
Something like:
Thank you
Beta Was this translation helpful? Give feedback.
All reactions