Add default failure messages to the remaining string expectations (#1948)

* Add default failure messages to the remaining string expectations

* test: update parallel snapshot count for the new default-message cases

---------

Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
This commit is contained in:
Vincent Borgers
2026-11-03 17:42:45 +01:00
committed by GitHub
parent b3baf7e210
commit e107ac707c
16 changed files with 119 additions and 2 deletions
@@ -17,6 +17,10 @@ test('failures with custom message', function (): void {
expect('-')->toBeAlphaNumeric('oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('failures with default message', function (): void {
expect('-')->toBeAlphaNumeric();
})->throws(ExpectationFailedException::class, 'Failed asserting that - is alphanumeric.');
test('not failures', function (): void {
expect('abc123')->not->toBeAlphaNumeric();
})->throws(ExpectationFailedException::class);